Mid-level interview questionAsked at Harvey · interview write-up
You have a contract and several dozen legal rules. Design an LLM agent system that revises the contract until it complies with every rule.
Model answer
Don't put every rule into one prompt. First map each rule to the clauses it touches. Then, per rule, a checker decides compliant or not and cites the span, and a reviser edits only failing clauses. Fixes can conflict, so re-check every rule against the revised contract and loop until all pass or a budget runs out, escalating conflicts to a lawyer. Output a tracked-changes diff and per-rule report.
Practise the rest
15 Agents questions, 492 in all, each with a model answer. Free.
More from Harvey interview questions.
More Agents interview questions
- What actually is an AI agent?
- LLM workflow or agent: which is better?
- Your agent is very slow. What can you do?
- What are guardrails, and where do they sit in an agent?
- What are the bottlenecks of AI agents, and how do you keep them in check?
- Design a harness for running a tool-using agent safely, and an evaluation platform on top of it.