Classifying RAG passages
Score each retrieved passage before it reaches the answering model.
Classification- Result
- Passage routing decided in code from Jev probabilities
Lexical retrieval ranks wording, not truth. This Jev classification use case sits between retrieval and generation.
Each query-passage pair gets several questions in one call. The answers decide whether the passage is evidence, a conflict, or junk.
The cookbook plants a prompt-injection passage among lookalike auth docs so the routing rules have something to catch.
Pipeline
- Retrieve candidate passages
- Ask Jev relevance, contradiction, and injection questions
- Keep evidence, flag conflicts, drop injections
- Hand only the routed blocks to the answering model
Builder: TypeSafe cookbook. Stack: jev.