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:

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
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

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.

“Our multi-faceted evaluation strategy includes fast, reliable code checks, end user and internal human feedback, and LLM-based grading for complex judgments at scale.”article, stated
“An automated script runs the entire eval test suite and reports pass/fail rates, regressions, and improvements.”article, stated

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.

“Evaluations (evals) are like end-to-end tests for AI and other probabilistic systems. They assess output quality against defined criteria using automated checks, human judgment, and AI-assisted grading.”article, stated
“In combination with high-quality data, great models and strategies, and user feedback, they become the engine of a new development cycle”article, stated

Models used: LLMs · LLM-based graders · AI SDK · v0 · RAG chatbot · Braintrust

Scale

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.

“LLMs, however, introduce probabilistic behavior. They operate as black boxes, making their responses difficult to predict.”article, stated

Use only code-based grading.

Rejected because: Objective checks are fast, but Vercel says code cannot cover every kind of eval.

“Unfortunately, you can’t code every type of eval”article, stated

Use only human grading.

Rejected because: Human judgment is valuable but does not scale as efficiently as automated or LLM-assisted grading.

“Using other AI models to assess the output offers scalability for complex judgments.”article, stated

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.

“Our flagship AI product, v0, is built on eval-driven development.”article, stated

llm-as-judge (evaluation)

LLM-based grading is used for complex judgments that need more scale than human-only review.

“LLM-based grading:** Using other AI models to assess the output offers scalability for complex judgments.”article, stated

human-in-the-loop-gate (evaluation)

Human feedback and grading remain part of the evaluation system for subjective quality and creativity.

“Human grading:** Leveraging human judgment for subjective evaluations is essential for nuanced assessments of quality and creativity.”article, stated

prompt-versioning (iteration)

Prompt changes are frequent, and evals provide regression protection around those changes.

“We iterate on prompts almost daily. Evals prevent regressions and ensure accurate source matching when updating RAG content.”article, stated

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.

“There are three primary types of evals:”article, stated

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.

“While potentially less reliable than human grading, this approach is more cost-effective and efficient for large-scale evaluations.”article, stated

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.

“without totally giving up the human-in-the-loop.”article, stated

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.

“This approach recognizes inherent variability and measures overall performance—not individual code paths.”article, stated

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.

“Maintaining these evals presents an ongoing challenge and requires updates as the AI system evolves.”article, stated

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.

“Every new data source requires appropriate evals to ensure the AI effectively uses it without hallucinations or other issues.”article, stated

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

“Every GitHub pull request that impacts the output pipeline includes eval results.”article, stated
“Braintrust logs everything for manual review. Every GitHub pull request that impacts the output pipeline includes eval results.”article, stated

Outcomes

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.

“This catches errors early, speeds up iteration, and drives continuous improvement based on real-world feedback.”article, stated
“When we add features like Vue or Python support, accompanying evals guarantee quality.”article, stated