
Services
A neutral, framework-first guide to AI agent evaluation in 2026. Decision tree, comparison matrix for LangSmith, Langfuse, Braintrust, and the four eval layers every production agent needs.

Your agent worked perfectly in the demo. It has been silently degrading for three weeks. The customer found it before you did. This is the LLM evaluation stack that catches the regression before the screenshot lands in your inbox - the same one I implement with paying clients running production AI agents on LangGraph, CrewAI, and custom orchestrators.
An LLM eval asks: did the model give the right answer to this prompt? An agent eval has to ask three more questions. Did it call the right tools? Did it call them in the right order? Did it recover when a tool failed? An LLM produces a string; an agent produces a trajectory - a sequence of decisions, tool calls, and intermediate states. A correct final answer can hide a broken trajectory that costs ten times more or fails on the next prompt.
This is why teams that bolt LLM-style evals onto agents miss regressions. Their eval reports green while their token bill silently doubles because the agent now retries every tool call twice. The fix is to evaluate the path, not just the destination.
Every agent I have shipped to production in the last 18 months runs all four of these. Skip a layer and you create a blind spot.
Layer 1 - Unit evals. Test individual components: a single tool call, a single classifier, a single extraction prompt. Fast (under 5 seconds), runs on every commit, catches prompt-template regressions.
Layer 2 - Trajectory evals. Test the full agent on a fixed dataset of 50-200 real prompts. Compare the trajectory (tools called, order, intermediate state) against a golden run. Catches routing regressions and unnecessary tool retries.
Layer 3 - Outcome evals. Test whether the final output is correct using LLM-as-judge or ground-truth labels. The most expensive layer. Run nightly, not on every commit.
Layer 4 - Online evals. Sample 1-5% of live production traffic and grade it asynchronously. The only layer that catches drift, prompt injection, and edge cases your golden dataset missed.
Build your eval stack bottom-up. Each layer assumes the one below it is in place.
1. Unit (foundation). 50-200 cheap, fast tests. Run on every PR. Block merges on regressions.
2. Trajectory. 50-200 full agent runs against golden trajectories. Run on every PR. Investigate any new tool-call sequence.
3. Outcome. LLM-as-judge or human grading on a curated 100-prompt set. Run nightly. Track accuracy delta over time.
4. Online. Async sampling of live traffic with LLM-as-judge. Run continuously. Alert on accuracy drops over a 24-hour window.
Most teams stop at layer 2 and wonder why production keeps surprising them. The top layer is where real users live.
If your agent answers from your documents, one accuracy score hides the real problem. A wrong answer can come from retrieval (the right passage never reached the model) or from generation (the passage was there and the model ignored or misread it). The fixes are completely different, so RAG evaluation has to score the two halves on their own.
| Metric | What it asks | If it drops, fix |
|---|---|---|
| Context recall | Did retrieval return the passages needed to answer? | Chunking, embeddings, hybrid search, query rewriting |
| Context precision | How much of what was retrieved is actually relevant? | Reranking, lower top-k, metadata filters |
| Faithfulness | Is every claim in the answer supported by the retrieved context? | Prompt grounding rules, citations, a stronger model |
| Answer relevance | Does the answer address the question that was asked? | Prompt instructions, query understanding |
In practice I build a set of 50-100 questions with the source passage labelled for each one, then run retrieval-only checks on every PR (they are cheap and need no judge model) and LLM-as-judge faithfulness checks nightly. Open-source libraries such as Ragas implement these metrics, and both LangSmith and Langfuse can store the scores next to the traces, so a failing answer links straight to the chunks it was given. For the retrieval patterns themselves, see agentic RAG patterns.
| Tool | Best For | Trace Capture | Eval Runner | Self-Host | Pricing Pattern |
|---|---|---|---|---|---|
| LangSmith | LangChain/LangGraph teams | Native, zero-config | Built-in | Enterprise only | Per-trace, scales fast |
| Langfuse | OSS-first, self-hosted, multi-framework | SDK for any stack | Built-in (basic) | Free, MIT-licensed | Cloud tiers, free self-host |
| Braintrust | Teams shipping weekly with heavy eval needs | SDK | Best-in-class, parallelized | No | Per-eval-run, predictable |
| Custom (Postgres + LLM judge) | Strict data residency, unusual stacks | You build it | You build it | Yes | Eng time, not SaaS fees |
The tool matters less than the workflow. Whichever you pick, running LLM evals for an agent comes down to the same four steps:
LangSmith is the lowest-friction choice if you are already on LangChain or LangGraph: traces, datasets, and experiments live in one place with almost no setup. Langfuse does the same job framework-agnostically and can be self-hosted, which matters when trace data cannot leave your infrastructure. Either way, the dataset and the trajectory checks are the asset - the tool is replaceable.
A B2B client running a customer-support agent on LangGraph started getting complaints about wrong answers in their billing flow. The team had no trajectory evals. They spent four engineering days bisecting recent prompt changes, found nothing, and were ready to roll back two weeks of work. We added a 60-prompt trajectory eval that took 90 minutes to wire up. The first run flagged that the billing-tool node was being called twice on 41% of trajectories - a routing change two weeks earlier had introduced a loop that doubled tool latency and bill, and occasionally returned stale data on the second call. We fixed the routing in 20 minutes. Total time from "we have a problem" to "we have a fix": 6 hours. Without trajectory evals it would have been three weeks.
1. Evaluating on prompts that look like your training set. Real users send messy, malformed, ambiguous prompts. Your eval set must too. Pull eval prompts from production traffic, not from your imagination.
2. No golden dataset. You cannot measure regression without a baseline. Curate 50-100 prompts with verified correct trajectories before you ship v1, not after.
3. Only evaluating final outputs. The trajectory matters. A correct answer reached via 12 tool calls when it should take 3 is still a regression - it just costs 4x and fails the next time.
4. Running evals nowhere except locally. Evals belong in CI. If they do not block merges, they get skipped under deadline pressure.
5. No online sampling. Pre-deployment evals catch known failure modes. Online sampling catches the unknown ones - which is most of them in the first six months.
No. Langfuse and Braintrust both support arbitrary frameworks via their SDKs. LangSmith works best when you are already on the LangChain stack because trace capture is automatic. For non-LangChain agents, Langfuse is the better default.
Unit evals on every commit. Trajectory evals on every pull request to main. Outcome evals nightly. Online sampling continuously. If your eval suite takes more than 10 minutes for the PR-level layers, parallelize it before you slow down.
Start with 50 prompts that cover your top 5-10 user intents. Grow to 200 over the first three months. Past 500 prompts you hit diminishing returns - quality of curation matters more than count.
Yes, with one rule: the judge prompt must be different from the agent prompt and must include a rubric. Self-judging without a rubric inflates scores by 10-15%. With a rubric, agreement with human grading runs around 85%, which is good enough for trend detection.
For a 100-prompt nightly eval suite using GPT-4o-mini as judge, expect roughly $2 per night, $60 per month. Online sampling at 3% of 100K daily requests adds about $90 per month. The all-in eval bill for a mid-size production agent typically lands under $300 per month - cheap insurance against silent regressions.
You cannot ship an AI agent and hope for the best. The teams that win in 2026 are not the ones with the cleverest prompts; they are the ones with the eval stack that catches a regression in hours instead of weeks. Pick the layer you are missing, wire it up this week, and you will sleep better next month.
Need help wiring an eval stack onto an existing production agent? Happy to scope it in a free 30-minute call, or book an eval-coverage audit first.
Free 30-minute scoping call. We will sketch the four layers and pick the right tool for your stack.
Book a Scoping Call