mtyrrell/chatfed_reranker
0
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
- 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:
- HuggingFace:
HF_TOKEN
- 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:
Example Usage:
{
"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.
