Team Ai
Apppublic

mtyrrell/chatfed_reranker

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
App README

ReRanker Module

This is an LLM-based generation service designed to be deployed as a modular component of a broader RAG system. The service runs on a docker container and exposes a gradio UI on port 7860 as well as an MCP endpoint.

Configuration

  1. 1.The module requires an API key (set as an environment variable) for a model provider to run. Make sure to set the appropriate environment variables:
  2. 2.HuggingFace: HF_TOKEN
  1. 1.Inference provider and model settings are accessible via params.cfg

MCP Endpoint

Available Tools

rerank_context

Re-ranks a list of context dicts (each with 'pagecontent' & 'metadata') using a cross-encoder and returns the topn sorted results.

Input Schema:

ParameterTypeDescription
querystringThe search query to rank contexts against
contextsstringList of context dictionaries to be re-ranked

Example Usage:

json
{
  "query": "your search query here",
  "contexts": "your context data here"
}

This tool uses a cross-encoder model to improve the relevance ranking of retrieved contexts based on their similarity to the input query.