WhoBuilt

Lessons from the Trenches: Building LLM Evals That Work IRL

Feb 6, 2025· 19 min· 15K views·Watch on YouTube

Speaker

Aparna Dhinkaran, co-founder of Arize, explains how teams can build and use LLM evaluations for real applications at an AI Engineer event.

Choose evals for the application task

Model evals compare models on benchmarks, while task evals check whether an application works for its users. Dhinkaran describes LLM-as-a-judge, user feedback, and heuristic approaches as common ways to evaluate applications.

Evaluate routing and function calls

In a chat-to-purchase example, a router sends a customer’s request down an execution path. Dhinkaran shows a request about phone promotions routed to product search instead of the promotions function, noting that a wrong initial call can throw off the rest of the workflow. She recommends checking both the chosen function and the parameters passed to it.

Use traces and explanations to improve

Using Arize’s open-source Phoenix, Dhinkaran walks through a trace that shows the user’s request, the generated function call, and the application’s execution. She recommends using traces and eval explanations to locate errors, add examples to a dataset, and run experiments as prompts or components change. Teams can develop evals during building, then monitor applications and run eval jobs in production.

Match evals to application levels

Dhinkaran describes evals at session, trace, and span levels so teams can investigate behavior at different scales. She says a score alone can be hard to act on and recommends explanations that point teams toward what to inspect or fix.

Test score formats, retrieval, and generation

In a spelling experiment, an LLM judge gave documents with about 80% and 11% corrupted text the same score of 10, leading Dhinkaran to caution against relying on numeric scores alone. She also describes tests where fact placement in a long context affected retrieval, and a retrieval-with-generation task where GPT-4 initially performed almost four times worse than Claude 2.1. Asking GPT-4 to explain before answering substantially improved its generation performance.

Takeaways

  • Separate model comparisons from evaluations of whether your application completes its task.
  • For routed workflows, evaluate the selected function and the parameters it receives.
  • Use traces and evaluation explanations to find where a failure occurred and guide iteration.
  • Design evals at session, trace, and span levels as application behavior becomes more complex.
  • Check whether numeric scores distinguish performance meaningfully, and test retrieval and generation separately.

Mentioned in this talk

Search inside this talk

What was claimed 8

Related talks