Eval-Driven Development for AI Applications
vercel · Tech · 2024 · source Agentic: no · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)
Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.
Problem
Domain: evaluation-driven development for AI-native applications
Vercel needed a way to develop and ship probabilistic AI systems such as v0 when traditional deterministic tests cannot fully predict or assert LLM outputs.
Constraints:
- LLM responses are variable and difficult to predict even for the same input.
- Some output-quality properties are subjective and cannot be captured fully by code checks.
- RAG content, prompts, model choices, and new product features can introduce regressions.
- Evaluation suites themselves require ongoing maintenance as the AI system evolves.
- The product must combine safety, quality, speed, user feedback, and model experimentation.
Architecture
Vercel frames eval-driven development as the operating system for AI-native product iteration. v0 combines code-based grading, human feedback, and LLM-based grading, then feeds those signals into a flywheel of data quality, models and strategies, feedback, prompts, and evals. Automated eval suites run on output-pipeline changes, Braintrust logs results for manual review, and new failing prompts are added back into the evaluation set.
Diagram confidence: reconstructed (reconstructed from prose).
flowchart LR ai-product-output-pipeline["AI product output pipeline"] --> code-based-grading["Code-based grading"] ai-product-output-pipeline --> human-grading["Human grading"] ai-product-output-pipeline --> llm-based-grading["LLM-based grading"] code-based-grading --> eval-result-store["Eval result store"] human-grading --> eval-result-store llm-based-grading --> eval-result-store eval-result-store --> ai-native-flywheel["AI-native flywheel"] ai-native-flywheel --> ai-product-output-pipeline
Components
| Component | Role | Interacts with |
|---|---|---|
AI product output pipeline |
Generates AI outputs such as v0 UI code and RAG-backed responses. | Code-based grading, Human grading, LLM-based grading |
Code-based grading |
Runs deterministic checks such as regex, code-block validation, and component-quality checks. | Eval result store |
Human grading |
Collects expert, end-user, and internal judgment on subjective output quality. | Eval result store |
LLM-based grading |
Uses AI models to judge complex outputs at greater scale than human-only review. | Eval result store |
Eval result store |
Aggregates scores, pass/fail rates, regressions, improvements, and logs for manual review. | AI-native flywheel |
AI-native flywheel |
Turns eval results, data quality, model strategies, and feedback into continuous product improvement. | AI product output pipeline |
Data flow
AI product outputs are evaluated by code checks, human review, and LLM-based graders. Scores, user feedback, failing prompts, and regression reports flow into the eval suite, prompt updates, RAG content updates, model strategy tests, and product iteration loop. Pull requests affecting the output pipeline include eval results, while logs support manual review.
Why this architecture
Vercel uses multiple evaluator types because no single method covers AI output quality. Code checks are fast for objective properties, human grading handles nuanced judgment, and LLM grading scales more subjective checks. Feeding all of those signals into the AI-native flywheel lets teams catch regressions while still iterating on prompts, models, RAG content, and product features.
Models used: LLMs · LLM-based graders · AI SDK · v0 · RAG chatbot · Braintrust
Scale
- LLM evals cost about 1.5x to 2x more than code-based grading.“Note that LLM evals still cost 1.5x to 2x more than code-based grading”article, stated
- v0 maintains a 100% pass rate on safety evals.“We prioritize refusal and safety evals, maintaining a 100% pass rate.”article, stated
- The v0 team iterates on prompts almost daily.“We iterate on prompts almost daily. Evals prevent regressions and ensure accurate source matching when updating RAG content.”article, stated
Alternatives considered (roads not taken)
Rely on traditional deterministic tests alone.
Rejected because: AI outputs vary and cannot be exhaustively asserted with fixed expected outputs.
Use only code-based grading.
Rejected because: Objective checks are fast, but Vercel says code cannot cover every kind of eval.
Use only human grading.
Rejected because: Human judgment is valuable but does not scale as efficiently as automated or LLM-assisted grading.
Patterns
eval-driven-development (AI product development)
Vercel treats evals as the development loop for probabilistic systems, using them to catch regressions and drive v0 improvements.
llm-as-judge (evaluation)
LLM-based grading is used for complex judgments that need more scale than human-only review.
human-in-the-loop-gate (evaluation)
Human feedback and grading remain part of the evaluation system for subjective quality and creativity.
prompt-versioning (iteration)
Prompt changes are frequent, and evals provide regression protection around those changes.
Tradeoffs
Combine evaluator types.
Chose Code checks, human grading, and LLM-based grading over A single evaluation mechanism.
Rationale: Objective, subjective, and scalable judgments each cover different parts of AI quality.
Use LLM graders despite higher cost.
Chose LLM-based grading for complex judgments at scale over Only cheaper code-based checks.
Rationale: LLM graders cost more but can scale evaluations that code checks cannot express.
Keep humans in the loop for eval maintenance.
Chose Manual review and human feedback alongside automation over Fully automated eval management.
Rationale: Vercel still sees human-in-the-loop review as necessary while seeking more scalable maintenance.
Gotchas (what bit them)
AI outputs cannot be tested like deterministic code.
Root cause: LLMs are probabilistic black boxes, so exact-output assertions miss important behavior and variability.
Resolution: Use evals that measure quality across criteria rather than only individual code paths.
Eval suites become work to maintain.
Root cause: As the AI system evolves, tests and evaluation prompts must evolve too.
Resolution: Vercel keeps adding new failing prompts and looks for ways to make eval management more scalable without dropping humans.
New data sources create hallucination risk.
Root cause: Adding source material changes the model's retrieval and answer behavior.
Resolution: Add appropriate evals whenever new data sources are introduced.
Evaluation
The case is itself about evaluation: Vercel uses code-based, human, and LLM-based graders; PR eval results; Braintrust logging; refusal and safety evals; feature-specific evals; and failing prompts added to the suite.
Metrics: Pass/fail rates · Regressions · Improvements · 100% safety eval pass rate · Source matching accuracy · User feedback · Code quality checks
Outcomes
- v0 uses eval-driven development as its operating model.
- Vercel maintains a 100% pass rate on refusal and safety evals.
- The eval system catches errors early, prevents regressions, and feeds continuous improvement.
The article gives methodology and operating-cadence scale more than user scale: daily prompt iteration, PR-level eval reports, 100% safety-eval pass rate, and LLM-grader cost of 1.5x to 2x code-based grading.