WhoBuilt

Best Practices for Evaluating Large Language Model Applications with llmeval

Feb 5, 2025· 10 min· 469 views·Watch on YouTube

Speaker

Niklas Nielsen, CTO and co-founder of Log10, presents llmeval at AI Engineer and shows how teams can evaluate LLM applications as they change prompts, models, and use cases.

Define what good means

Nielsen says teams need ways to judge quality before changing prompts, configurations, or model providers. Without clear criteria, evolving an LLM application is difficult and risky.

Set up repeatable evaluations

He introduces llmeval, a command-line tool that creates a folder structure for prompts and tests. Its Hydra-based configuration is extensible, and Python metrics can use custom logic or call other LLMs.

Test outputs across models

Nielsen demonstrates comparing actual and expected outputs, including trimming leading spaces that some models add. Tests can use flexible pass thresholds; `llmeval run` runs all tests, while options such as `prompts=math` and `n_tries=1` narrow the run. By default, each test gets five samples, and reports summarize failures across Claude 3, GPT-4, and GPT-3.5.

Evaluate code and diagrams

An example checks whether generated Python can be parsed, and Nielsen says those tests pass. He also describes model-based grading for Mermaid diagrams, with criteria that produce a score from one to five.

Combine model and human feedback

Nielsen says model-based evaluation can provide judgments, scores, preferences, and reasoning, but models may favor their own outputs and give unreliable point scores. He describes modeling a person's prior feedback to suggest reviews of new completions, which humans can then assess.

Takeaways

  • Write explicit evaluation criteria before changing prompts or models.
  • Run multiple samples per test to gauge output stability; llmeval defaults to five.
  • Use tolerant pass thresholds when exact outputs are unreliable.
  • Check generated code with a concrete validation, such as parsing it.
  • Treat model-generated scores as fallible and review suggestions against human feedback.

Mentioned in this talk

Search inside this talk

What was claimed 7

  • founded
    CTO and co-founder
    “I'm the CTO and co-founder of Log10”
    YouTube
    Verified3 sources· Talk, Web· archived
  • built
    “a new tool that we've built this year”
    YouTube
    Unverified1 source· Talk
  • uses
    “It's based on a highly configurable system from Meta called Hydra”
    YouTube
    Unverified1 source· Talk
  • feature
    llmeval: Command-line tool that runs locally
    “It's a command-line tool that you can run locally”
    YouTube
    Unverified1 source· Talk
  • feature
    llmeval: Generates reports summarizing evaluation runs and failures
    “you can generate reports that give you a brief overview”
    YouTube
    Unverified1 source· Talk
  • metric
    llmeval: Five samples by default; n_tries can override the sample count
    “by default, we do five samples”
    YouTube
    Unverified1 source· Talk
  • feature
    llmeval: Supports model-based grading against defined criteria
    “we also have model-based evaluation”
    YouTube
    Unverified1 source· Talk

Related talks