WRITE · TRACE · UNDERSTAND
Project: assemble and verify a permission-scoped RAG response
Use the secure_bm25 contract with k1=1.2,b=.75 over authorized documents.
Read lesson: Project: assemble and verify a permission-scoped RAG response →
Your experiment
Use the secure_bm25 contract with k1=1.2,b=.75 over authorized documents. Request has exactly tenant,roles,query,k,word_budget (nonnegative integer). Visit top-k ranked chunks, admitting whole text only when its whitespace-word count fits remaining budget, skipping oversized chunks. output is a saved provider-output fixture with exactly claims: a list of closed records text,source,start,end,quote. Require nonempty claim text, a source in admitted context, valid integer code-point offsets, and exact quoted text. Return context_ids,words,claims,joined answer and abstained. Empty claims mean abstention. No model inference or semantic entailment judgment is implemented.
Python runs in your browser. Your draft stays on this device.
What to look for
Review each boundary independently: ACLs, corpus statistics, context budget, citation provenance, faithfulness and abstention. A valid structural response is not proof against prompt injection. Replay follows the main orchestration function; helper computations execute and are checked separately.
Watch your code work
Ready to experimentWrite a solution or load the worked answer, then choose Trace & check.
Step through arrays, variables and training curves produced by your own Python.
