Lawfare Group → Knowledge Institute → Lawfare Academy
← AI 320 — Applied AI, Retrieval and Reliable Automation
Weeks 15–16
A bounded retrieval assistant and operating plan
Learning objectives
- Explain and trace the mechanisms in a bounded retrieval assistant and operating plan.
- Apply the method to the worked example and changed-condition exercise.
- Identify assumptions, failure cases and the evidence needed to justify a result.
The final project connects retrieval, output validation, evaluation and workflow control. Begin with fictional documents and local execution. Keep the first release narrow: answer policy questions with evidence or abstain, produce drafts for review and simulate actions rather than contacting people or changing records. This scope lets you test failure behavior without conflating a demonstration with permission to act.
Document the complete chain from question to final result. Which passages were eligible, which were retrieved, what context was supplied, which output was proposed, which checks passed and what a reviewer approved? Store only the information needed for diagnosis under a clear retention policy. A log containing raw private prompts can itself become a sensitive datastore. Keep secrets outside source code and browser bundles, and enforce limits at the server.
An operating plan specifies source updates, model and prompt versions, evaluation triggers, cost budgets, incident response and retirement. A model provider update can change behavior without an application code change. Repeat representative checks when dependencies change. Provide a useful fallback, such as source search without generation. Judge readiness by demonstrations of supported answers, correct abstention, denied access, safe retries and recovery after interruption, not by a claim that the assistant is autonomous.
Worked reasoning This non-generative baseline returns an attributed passage rather than synthesizing unsupported claims. It is not a complete answer-verification system: lexical matching can still return an irrelevant passage. Its purpose is to make the contribution of generation measurable. The retrieve function is defined in the preceding unit; include it or import it when running this snippet.
Extended teaching and laboratory
A release gate connects evidence to an operating decision. Specify the permitted corpus, claim types, action boundaries and failure response before evaluating. Include a transparent non-generative retrieval baseline so generation’s incremental contribution can be measured. A system that cites a passage is not necessarily faithful: it can cite an irrelevant passage or omit an exception.
Version the entire configuration, including model, prompt, retrieval settings, source snapshot and validator. A provider update can change outputs without an application deployment. Rerun representative evaluations after consequential changes and preserve a fallback that is actually tested.
Worked problem An assistant answers 90 of 100 routine questions correctly but sends one unauthorized external request. The release rule permits no unauthorized actions in the test suite. Evaluate the gate.
Step-by-step reasoning 1. Routine answer accuracy is 90%, but it is not the only release criterion.
- The unauthorized action violates the declared gate. Do not average it away as one error among 100 questions.
- Disable or constrain external actions, repair the boundary and rerun both the failing case and related adversarial variants.
- Document that passing a finite gate supports the bounded release decision; it does not prove that no future unauthorized action is possible. Maintain monitoring and a fallback.
Apply the idea
An assistant answers 90 of 100 routine questions correctly but sends one unauthorized external request. The release rule permits no unauthorized actions in the test suite. Evaluate the gate.
A new model version passes average accuracy but fails three previously passing exception-policy cases. What should the release comparison show?
Read the worked reasoning
Show case-level regressions, their severity and the applicable release criteria alongside the aggregate. A stable average can mask changed failure modes. Investigate the exceptions, keep the prior bounded configuration or fallback when required, and rerun the affected source/validation tests before release.
Check understanding
What is the strongest readiness evidence for this prototype?
- Reproducible task tests including abstention, denied access and recovery
Feedback
Observable behavior under failures is stronger than presentation alone.
- A single persuasive generated demonstration
Feedback
A selected demonstration gives little evidence about error rates.
- A claim that all future prompts will behave correctly
Feedback
No finite evaluation guarantees every future behavior.
Further reading
Study the complete on-site source sections below, then work the original example, changed-condition problem and transfer laboratory. Complete the assigned source exercises relevant to your chosen workflow. Integrate CS 101 testing, CS 220 boundaries and AI 301 evaluation into a reproducible prototype.