Recipes 03 hands-on 6 min Updated Sep 20, 2026
RAG passage filtering
Retrieve candidates with your search stack; ask Jev which snippets are relevant enough to keep—code enforces the cut.
Hands-on: filter RAG references
Jev does not replace your retriever. Pattern:
- Retrieve a candidate list (BM25 / embeddings / hybrid).
- Put query + each candidate (or a batch) into state.
- Ask Noul (“relevant enough?”) or Score (relevance levels) or Choice (keep / drop / unsure).
- Code keeps, drops, or escalates based on thresholds.
Why this helps
Narrow relevance judgments are a better System One fit than asking an LLM to “rewrite the answer from everything.” Keep generation (if any) after the filter.
Guardrails
-
Cap how many candidates you score per request (cost/latency).
-
Never treat “relevant” as “true”—citation still needs your product rules.
-
Log drops for spot checks.
-
Cookbook: Classifying RAG passages