OverSearchGuard

Conflict-aware evidence thinning for agentic RAG, with cost-aware robustness to duplicated noise.

OverSearchGuard is an evidence-governance layer for agentic RAG: it sits between retrieval and generation and selects a small, high-confidence, conflict-aware subset of evidence lines before calling the LLM — no fine-tuning required.

retrieval → OverSearchGuard → LLM

What it does

  • Robust to “wrong-but-repeated” evidence via cap-per-source (anti-dup / anti-spam).
  • Explicit reliability + recency modeling (source weights + half-life decay).
  • Cost-aware policy: reports TPC (total tokens per correct answer) and supports optional BEA (Budgeted Evidence Accumulation).

Results (reproducible)

Benchmark: paper suite (n=300, google/flan-t5-small, CUDA).

  • Accuracy: 0.143 → 0.970 (bea_fallback, best)
  • Avg total tokens: 491.5 → 117.3

Quick use (library)

from oversearchguard.api import build_thin_prompt

payload = build_thin_prompt(question, evidence_lines)
prompt = payload["prompt"]       # send to any LLM
candidate = payload["candidate"] # CACT candidate (useful for guardrails)