Mid-level interview questionAsked at Harvey · interview write-up
How would you train an LLM agent for long-context, long-horizon tasks? What environments and rewards would you build?
Model answer
Build environments that mirror the work: a sandbox with a document store, search and editing tools, and tasks spanning dozens of steps over long files. Warm-start with supervised fine-tuning on expert trajectories, then RL. Prefer verifiable rewards, like the right clauses found or the final document passing checks; use a calibrated judge for the rest, a small step penalty, and a curriculum from short to long tasks. Read transcripts for reward hacking.
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.