← Back to posts

Practical LLM Evaluation: What I'd Actually Do When Building AI Agents

Having spent time building and evaluating GenAI applications, particularly voice agents, I've realized that LLM evaluation doesn't have to be as complicated as we sometimes make it.

Here's a pragmatic approach I'd take when building an evaluation pipeline from scratch.

1. You probably don't need 10K+ samples to get started

When building prompt-driven GenAI applications, your iteration loop is often focused on prompts, context, tools, guardrails and orchestration rather than model training.

A carefully curated golden dataset of 100 meaningful test cases can go a long way in validating workflows, catching regressions and iterating quickly.

This isn't a substitute for statistically rigorous evaluation but for early-stage development, I'd rather have 100 well-thought-out cases than thousands of questionable ones.

2. Think like a data scientist. Break evaluation into dimensions.

Don't create one vague metric called AI Quality and chase score. Decompose the problem.

For a website support chatbot, you might evaluate:

  • Factuality: Are responses grounded in actual product information?
  • Role alignment: Is the chatbot operating within its intended role?
  • Safety: Does it avoid harmful or prohibited responses?
  • Neutrality: Does it avoid biased or leading responses?
  • Relevance: Is it answering the user's actual question?
  • Tool correctness: Is it using the right tools and arguments?

Don't over-engineer the taxonomy in V1. A rough classification is good enough to get started. Refine it as your system evolves.

3. Start with deterministic and semantic evaluations

I'd broadly categorize evaluation checks into two buckets:

Deterministic checks:

  • Valid JSON / schema validation.
  • Correct tool invocation.
  • Latency thresholds.
  • Required fields.
  • Explicit rule-based constraints.

Semantic evaluations:

  • Is the response relevant?
  • Did the agent understand the context?
  • Is the follow-up insightful?
  • Is the response appropriately empathetic?
  • Is the agent being neutral or leading the user?

Not everything fits neatly into either category, but this is a practical starting point for building your first evaluation pipeline.

4. Don't reinvent the wheel

LLM-as-a-Judge, G-Eval and DAG-based evaluation workflows will probably satisfy the needs of most engineers building everyday GenAI applications.

  • LLM-as-a-Judge: Use an LLM to assess responses against defined criteria.
  • G-Eval: A structured approach to qualitative evaluation using rubrics and LLM-based scoring.
  • DAG-based evaluation: Organize evaluation into multi-stage workflows with dependencies and conditional logic.

These approaches can be combined. A DAG can orchestrate the evaluation pipeline, while G-Eval-style judges evaluate subjective dimensions at individual stages.

DeepEval has been one of the particularly useful frameworks I've worked with for implementing these workflows. I'd recommend exploring it before building your own evaluation infrastructure.

5. Always assume contamination while working with public benchmarks with skepticism

Public benchmarks are useful references, but I'd never blindly trust them as the sole indicator of real-world capability.

Benchmark exposure, data leakage and optimization toward benchmark scores can make results less representative of actual performance.

Maintain your own task-specific, preferably held-out golden dataset. Use public benchmarks for context, not as ground truth.

6. Synthetic datasets are overrated.

Yeah, you can generate thousands of synthetic samples to validate scenarios at scale. But quantity doesn't automatically translate into quality.

Synthetic datasets can inherit the biases and blind spots of the models generating them. They can also produce repetitive, overly clean or unrealistic scenarios.

I'd rather spend time thinking through my application, its failure modes and potential edge cases, and curate meaningful scenarios than blindly generate 10,000 test cases.

Synthetic data certainly has its place, especially for adversarial scenarios, controlled variations and rare edge cases. Just don't assume generated data is automatically good data.

7. Evaluation shouldn't stop at deployment

A stable evaluation setup should eventually be integrated into production as well.

For V1, I'd start with asynchronous evaluation of sampled production outputs and agent traces. The goal initially isn't to automatically make consequential decisions based on evaluator scores, but to flag potentially failing outputs and workflows.

Use human review to validate failures, identify recurring patterns and uncover gaps in your existing evaluation setup.

Meaningful failures can then be added to your golden dataset, continuously improving your regression suite.

Evaluation isn't a one-time benchmarking exercise. It's an engineering feedback loop.