Local by design.
Filtering runs through a local cross-encoder. No LLM API key is needed for the filtering step.
ms-marco-MiniLM-L-6-v2Context optimization
for your LLM.
Keep the sentences that answer your question.
Leave the rest behind.
Context optimization for your LLM.
Retrieval finds the documents. Uma finds the sentences that matter to your question, before you send them to the model.
Bring your existing documents.
Query-aware sentence filtering.
Keep the model you already use.
Move the threshold to see how sentence filtering works. These example scores are illustrative, not live model output.
A score ranks relevance. It is not a probability.
What does Uma do to retrieved context?
Filtering runs through a local cross-encoder. No LLM API key is needed for the filtering step.
ms-marco-MiniLM-L-6-v2Set a relevance threshold or an optional token limit. Retained sentences return in their original order.
threshold=0.5 · max_tokensUma Calibrate tests thresholds against your benchmark so you can compare retained context with answer quality.
uma calibrateResults depend on your workload. Filtering can omit useful context and adds its own inference time. Calibrate before relying on a threshold.
Use Uma in Python or through LangChain. MCP clients connect to the same filtering engine.
Read the documentation ↗No. Uma keeps or removes whole sentences. The sentences it retains keep their original wording. Document metadata is preserved.
Uma sits between your retriever and your model. Pass retrieved documents through Uma, then send the resulting context to your existing LLM.
The cross-encoder runs locally and needs no LLM API key for filtering. Benchmarking and answer generation use the provider you configure.
Start with the default, then evaluate on your own questions. Uma Calibrate compares thresholds against a benchmark. Higher thresholds can remove information needed for an answer.
Results depend on the input and your provider. Filtering adds its own inference time. Fewer input tokens can reduce token-based charges, but latency improvements are not guaranteed.