liveBook · Manning

Error analysis

As explained in LLM Evaluation and Alignment, The Foundational Ideas

Error analysis is the systematic examination of failures in model outputs to identify recurring causes or patterns.

Error analysis systematically examines model failures to find recurring causes and patterns, then uses those findings to reduce the gap between current and desired behavior. section 8.5.1 section 1.3.1

Use error analysis as a practical diagnostic loop:

  • Measure the system against explicit criteria such as accuracy, politeness, latency, or resolution. section 1.3.1
  • Inspect incorrect outputs and group them into recurring failure modes. section 1.3.1
  • Apply a targeted alignment change, such as revising a prompt, adding retrieval, or extending a specification. section 8.5.1 section 1.3.1
  • Re-evaluate the modified system and investigate newly exposed errors. section 1.3.1

Null shipping information

A customer-service chatbot achieves 87% factual accuracy, but analysis of its inaccurate responses reveals hallucinated shipping dates when the database returns null values. The system is changed to state that information is unavailable and to retrieve shipping-policy documents; accuracy then rises to 94%, exposing a different issue for the next cycle. section 1.3.1

Figure 1.10 The iterative cycle of AI engineering. Define establishes what success looks like, Evaluate measures the current system against the designed evaluation metrics, Error analysis identifies failure modes, and then Align optimizes the system using different methods. The cycle then repeats.

The iterative-cycle figure situates error analysis between evaluation and alignment, showing why diagnosis and re-evaluation repeat throughout AI system development. section 1.3.1

How LLM Evaluation and Alignment, The Foundational Ideas covers it

How deep it goes
Traces measured failures to recurring causes and connects findings to prompt, retrieval, or specification changes.
Examples
Uses a customer-service chatbot that hallucinates shipping dates when order data is null, then improves through prompting and retrieval.
What it assumes
Assumes explicit success criteria and measured outputs while demonstrating how to investigate failures through a concrete chatbot example.
What you can do after
Diagnose model failures, identify recurring causes, and guide targeted prompt, retrieval, or specification changes.
How it connects
Connects evaluation metrics, alignment, prompt engineering, retrieval-augmented generation, fine-tuning, and production monitoring.

Also explained in

Compare how 4 books explain error analysis →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of LLM Evaluation and Alignment, The Foundational Ideas. The section links point to the parts of the book it draws on.