Design Grounded Demand Letter Generation With Verifiable Citations

Last updated: November 29, 2026

Quick Overview

Design an ML system that drafts a personal injury demand letter from extracted case facts and source documents, where every factual claim in the draft cites a source page and unsupported claims are caught before an attorney sees the draft.

EvenUp
ML System Design
Machine Learning Engineer
EvenUp
November 29, 2026
Machine Learning Engineer
System Design Round
ML System Design
Hard

0

0

0 solved


Design an ML system that drafts a personal injury demand letter from extracted case facts and source documents, where every factual claim in the draft cites a source page and unsupported claims are caught before an attorney sees the draft.

Drafting is the visible product at EvenUp, and a single invented diagnosis or wrong dollar figure in a demand undermines the firm's negotiation. The interviewer is probing retrieval, structured generation, automatic faithfulness checks, evaluation from attorney edits, and how human reviewers fit in.

What the Interviewer Expects
  • Separates deterministic content (totals, dates) from generated narrative
  • Grounds generation in retrieved, cited evidence with page ids
  • Adds a post-generation verification step for each claim
  • Defines offline and online evaluation, including attorney edit distance
  • Handles firm-specific style and jurisdiction rules
  • Discusses latency, cost and model choice trade-offs
Key Topics to Cover
Retrieval augmented generation
Faithfulness checking
Evaluation
Structured generation
Human in the loop
LLM ops
How to Approach This
  1. Start by mapping the business objective to a concrete ML objective and metric.
  2. Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
  3. Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
  4. Address the serving latency budget and whether batch or real-time inference is needed.
  5. Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
  • How do you build an evaluation set without leaking client data across firms?
  • An attorney says drafts are too generic: what do you change?
  • How would you detect that a new model version quietly reduced citation accuracy?
  • Where should the model refuse to write and ask for more records?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice ML System Design Problems
Sample Answer
Requirements

Inputs: structured facts from the extraction pipeline (visits, diagnoses, procedures, specials, wage loss), the raw page store, case metadata (jurisdiction, liability facts, policy limits) and the fir...

High-Level Design
  1. Assemble a case brief: deterministic code computes totals, the chronology and the damages table, which are inserted as fixed blocks, never generated. 2) For each narrative section, retrieve evidenc...

Submit Your Answer
Markdown supported

Related Questions