Retrieves documentation passages, asks four Noul questions per passage about relevance, answerability, contradictions, and prompt injection, then assembles only accepted evidence for the answering model.
Original by TypeSafe AIRetrievalTypeSafe cookbookSource reviewed
Before you dive in
What you’ll find in the original
Judge retrieved passages individually rather than trusting nearest-neighbor order.
Keep policy thresholds in code and distinguish useful evidence from contradictory or hostile text.
Build the answering prompt from the selected passages, not the entire shortlist.
Worth knowing
Filtering evidence cannot make an incomplete or incorrect source corpus truthful.