Software Engineer • Senior-Level
Software Engineer • Senior-Level
High QualityPrep Other System Design Questions Asked by Harvey
Continue with targeted system design prep from Harvey's system design questions.
Interview Summary
The Harvey onsite system design round focused on designing a multi-agent workflow for reviewing and modifying documents based on a collection of rules.
Interview Details
System Design — Rule-Driven Document Review Agent
Design an AI agent system that accepts a document and a collection of rules, evaluates the document against those rules, and produces the required review or revision output. The rules are provided as part of the input. The system should be able to coordinate multiple agents while ensuring that their proposed changes do not introduce inconsistencies.
Version 1 — Contract Revision with Multiple Legal Rules
In this version, the system receives:
- A legal contract
- Dozens of different legal rules
The goal is to evaluate the contract against those rules and produce a revised contract incorporating the necessary modifications. The system should support multiple agents, with individual sub-agents responsible for evaluating specific rules.
-
Part 1 — Parallel Rule Evaluation
Each rule-specific agent examines the supplied contract and determines whether modifications are necessary. For example, one agent might identify a clause that needs to be updated, while another identifies a different issue elsewhere in the contract.
The design needs to explain how these agents receive the document, process their assigned rules, and return proposed edits. A possible architecture is to have all agents work from the same immutable document snapshot, allowing independent rule evaluations to run concurrently.
-
Part 2 — Merge Proposed Modifications
After the rule-specific agents finish, the system needs to combine their proposed edits. This introduces several challenges:
- Multiple agents may modify the same paragraph.
- Two edits may overlap.
- Different rules may require incompatible changes.
- One modification may invalidate another proposed modification.
The interviewer was particularly interested in how these conflicts should be resolved.
-
Part 3 — Conflict Resolution Agents
The design should include additional agents or a
Unlock Full Details
Create a free account to unlock this interview experience report.