Skip to content

nocap

Evidence gate for RAG: a System One model judges whether retrieved excerpts support an answer before the LLM is allowed to speak.

MCP serverbeta

Overview

NoCap adds one step between retrieval and generation in a RAG pipeline or agent. A fast decision model, Jev (hosted), Laya (open weights), or any LLM via Ollama or an OpenAI-compatible API, checks whether the retrieved excerpts support an answer, only partly support it, miss it or conflict. Your thresholds turn that distribution into one of four routes: answer, retrieve_more, abstain or review_conflict. Only the answer route calls the generator.

The README's example shows a refund question where two documents disagree (30 vs 14 days): NoCap routes to review_conflict at 0.88 and does not call the LLM, instead of letting it invent an answer. For Laya it averages four label rotations by default to reduce option-order bias. It ships as a Python SDK, an MCP server, an HTTP service and CI route tests, with traces and replay. It is for teams whose RAG systems answer confidently from weak evidence.

What the decision model decides

TypeQuestionAnswers
ChoiceDo these excerpts support an answer to the question?supported · partial · missing · conflicting

How it works

  1. Retrieve excerpts for the user's question.
  2. Send question and excerpts to a /v1/systemone endpoint (or LLM judge).
  3. Map the distribution to answer, retrieve_more, abstain or review_conflict with thresholds.
  4. Call the generator only on the answer route.

Strengths

  • Prevents confident answers from missing or conflicting evidence.
  • Provider-agnostic: hosted Jev, local Laya or any LLM.
  • CI route tests and replayable traces.

Caveats

  • Gate quality depends on the judge model and thresholds.
  • Adds a decision call before every generation.

Getting started

In Python: gate = Gate(provider="laya") (or "jev", "ollama", "openai") and pass the question and excerpts before generating.

At a glance

Type
MCP server
Status
beta
Language
Python
Runtime
SDK, MCP server, HTTP
Has code
yes
Has tests
yes

Use cases and integrations

How curated lists describe it

  • No evidence, no answer. 🧢 System One evidence gate for RAG & AI agents: Jev / Laya / any LLM judges before your LLM speaks. MCP server, Python SDK, CI route tests.

    hellogumbo/awesome-jev

Frequently asked questions

What does NoCap decide?

Whether retrieved evidence supports, partly supports, misses or conflicts with an answer to the question.

Do I need TypeSafe?

No, it works with local Laya or any OpenAI-compatible or Ollama model as the judge.

What happens on a conflict?

It routes to review_conflict and shows the conflicting sources instead of calling the LLM.

Related projects

  • MCP server giving coding agents typed judgment tools (verify, screen, rerank, gate, score) backed by Jev, with auto/review/escalate policy.

    MCP serverbetaPython
  • Small stdio MCP server with ask, rank and verify tools backed by Jev, a local event log and installers for several agent harnesses.

    MCP serverbetaTypeScript
  • Evidence-first experiment-memory skill for coding agents, with an optional Jev audit layer that checks provenance and claim support.

    Agent skillbetaPython
  • Typed-decision accuracy layer for RAG: six checks for intent, relevance, clarification, sufficiency, grounding and caveats.

    ServicebetaPython
  • Precision-first RAG service where Jev routes queries, triages each retrieved chunk and verifies every claim before an answer is released.

    ServicebetaPython
  • MCP server over Apple developer docs and WWDC transcripts that uses hybrid search, then Jev relevance scores to rank results.

    MCP serverproductionTypeScript