WhoBuilt

How to Construct Domain Specific LLM Evaluation Systems

Sep 19, 2024· 19 min· 22K views·Watch on YouTube

Speakers

Emil Sedgh, CTO at Rechat, and Hamel Husain explain how they built domain-specific evaluations to improve Rechat’s AI assistant for real estate agents.

From prototype to production

Emil describes Rechat’s AI assistant, built to help real estate agents manage tasks such as creating contacts, sending emails, finding listings, and creating websites. The team’s GPT-3.5 prototype was slow and unreliable, and they lacked a way to tell whether changes improved its success rate or broke other use cases.

Start with domain-specific checks

Hamel recommends writing unit tests and assertions for observed failure modes before adopting generic evaluations or an LLM judge. Rechat checked issues such as emails not being sent, invalid placeholders, and repeated details. They ran checks in CI and tracked results in Metabase, using tools they already had.

Log traces and make review easy

Hamel stresses that teams need to inspect logged traces, not just collect them. Rechat used LangSmith for tracing and built a custom app to display domain-specific details, filter examples, and support human labeling. He says reducing friction in reviewing data is essential to keeping the process going.

Build a repeatable improvement loop

When user examples are scarce, Hamel suggests using an LLM to generate test inputs by role-playing a real estate agent across features and scenarios. Teams can use reviews and test results to guide prompt changes, curate fine-tuning data, and address failures. For an LLM judge, he recommends comparing its critiques with labels from a domain expert until the results align.

Fine-tuning enabled complex workflows

Emil says the evaluation framework helped Rechat increase the assistant’s success rate, and that few-shot prompting alone did not meet their needs. Fine-tuning supported mixed natural-language and interface output, requests for more user input, and complex commands involving five or six tools. In one example, the assistant found listings, created a website and Instagram post for the most expensive one, prepared an email, invited Hamel to dinner, and created a follow-up task.

Takeaways

  • Turn observed domain-specific failures into simple assertions before reaching for generic evaluations.
  • Log traces and make it easy for domain experts to inspect and label them.
  • Use tools you already have to track evaluation results while you establish the review process.
  • Generate synthetic inputs to broaden test coverage when real user examples are limited.
  • Compare an LLM judge’s results with domain-expert labels before relying on it.

Mentioned in this talk

Search inside this talk

What was claimed 5

  • built
    “we needed to build an AI agent for our real estate agents”
    YouTube
    Verified2 sources· Talk, Web· archived
  • works at
    Chief Technology Officer
    “I'm CTO at Rechat”
    YouTube
    Verified2 sources· Talk, Web· archived
  • uses
    “they were already using Metabase, so we logged these results there”
    YouTube
    Unverified1 source· Talk
  • feature
    Evaluation framework: Supports measuring progress, debugging failure modes, and curating data for fine-tuning
    “use your eval framework to filter out good cases and feed them into human review”
    YouTube
    Unverified1 source· Talk
  • feature
    Rechat: handles complex commands by coordinating multiple tool calls
    handles complex commands by coordinating multiple tool calls
    “break it down into many different function calls, and execute them”
    YouTube
    Unverified1 source· Talk

Related talks