Build a tiny retrieval-augmented step: rank documents by query-term overlap and return only the IDs that will become grounded context.
Required APIdef retrieve_docs(query, docs, k):
return [document_id, ...]BehaviorThink through the mechanism first if you want the extra reasoning step. It never blocks the editor.
retrieve_docs('cats sleep', {'a': 'cats sleep here', 'b': 'dogs run'}, 1)generation should see retrieved evidence, not the whole corpus
retrieve_docs('cats sleep', {'a': 'cats', 'b': 'cats sleep'}, 2)more evidence wins the ranking
2 hidden edge tests run after the visible contract passes.
Run Tests to see the contract verdicts here.