liveBook · Manning

Evaluation

As explained in Building Reliable AI Systems

The systematic measurement of an AI system's behavior and quality against defined criteria.

Evaluation measures whether an AI system behaves well against defined criteria. A chatbot can pass initial tests yet give subtly wrong answers after deployment, or work for most users while underperforming for particular groups. Define what success means before building, then keep measuring as models, data, and usage change. section 1.4.3 section 11.6.6

Use complementary methods rather than relying on one score:

  • Compare outputs with known answers using reference-based metrics such as ROUGE and BLEU. section 1.4.3
  • Use an LLM as a judge for quality, relevance, and faithfulness; add human review where automated measures are insufficient. section 1.4.3
  • Red-team the system to expose failures before users encounter them. Include common and edge cases in test sets, with diverse examples to help reveal disparities. section 1.4.3 section 11.6.6
  • Run automated evaluation in CI/CD and track results over time to detect regressions. In production, monitor semantic quality, hallucination rates, and user satisfaction—not only uptime and latency. section 11.6.6 section 1.4.3

For retrieval-augmented generation (RAG), assess retrieval and generation together: their interplay makes response accuracy and hallucinations harder to evaluate with a single measure. Test queries are useful for inspecting responses, but inspecting one answer is not a substitute for a test set and tracked metrics. section 3.6 section 11.6.6 section 3.8.10

question = "What are the best wireless headphones under $100?"
result = qa.invoke({"query": question})
print(result["result"])

A sample product question sent through `qa.invoke` prints the chatbot’s answer for inspection; the snippet does not score it against a reference or quality criterion. section 3.8.10

How Building Reliable AI Systems covers it

How deep it goes
Outlines complementary methods, test-set coverage, CI/CD checks, and ongoing tracking without specifying a scoring rubric or thresholds.
Examples
Uses a chatbot’s post-deployment errors and a sample product query to illustrate monitoring needs and response inspection.
What you can do after
Practice/perform evaluation with varied test cases, complementary review methods, CI/CD checks, and production metric tracking.
How it connects
Connects evaluation to RAG, hallucinations, red-teaming, fairness, observability, and drift monitoring.

Also explained in

Compare how 15 books explain evaluation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building Reliable AI Systems. The section links point to the parts of the book it draws on.