liveBook · Manning

Evaluation

As explained in Introduction to Generative AI, Second Edition

Evaluation is the assessment of model outputs against specified criteria to determine how well a model performs a task.

Suppose an AI writes property listings from photographs, floor plans, and facts about each home. Is a new prompt actually producing better descriptions? Evaluation means assessing outputs against criteria chosen for the task. It can compare prompts, models, or versions of the same model, rather than relying on a few appealing responses. section 7.7 section 7.8

A useful evaluation starts by making success specific:

  • Choose criteria. A property description might need to be accurate, tailored, positive, within a length limit, and clear about required facts such as flood-zone status. section 7.8
  • Gather sample inputs resembling the intended task, then test candidate prompts on them. section 7.8 section 7.12
  • Score outputs against the criteria. A metric is a score for a particular criterion; several metrics may be needed to understand performance. section 7.8

This process makes prompt engineering an experiment: change a prompt, compare its responses with those from the previous version, and look for improvements on the chosen examples. A change to a system prompt or model can also alter responses in unforeseen ways, so one attractive result is not enough to establish an overall improvement. section 7.7 section 7.12

When the AI acts instead of only answering

An AI agent may browse websites, use tools, and complete a multi-step task. The GAIA benchmark tests capabilities including reasoning, coding, and tool use through questions with unambiguously correct answers. That makes answers easier to score, but does not show how an agent reached them. AssistantBench focuses on tasks involving multiple websites; reported failure cases include relying too heavily on search results, inventing an answer, or failing to answer. section 8.16

For agents, a correct final answer may not capture the whole risk. Evaluation may also need to follow behavior over time and stress-test actions, including planning failures, memory drift, and misuse of tools. These methods matter when deciding whether an agent is reliable enough to deploy, though robust safeguards remain an open challenge. section 8.16 section 8.26 section 10.3

How Introduction to Generative AI, Second Edition covers it

How deep it goes
Defines criteria and metrics, then outlines sample-input testing and prompt comparison without prescribing a scoring formula.
Examples
Uses property-listing descriptions, GAIA questions, and AssistantBench’s multi-website tasks to illustrate different evaluation needs.
What it assumes
Introduces evaluation and metrics from plain-language definitions, using familiar ideas of inputs, prompts, and generated descriptions.
What you can do after
Practice/perform it by defining task criteria, testing sample inputs, and comparing outputs while checking whether agent scores overlook risky behavior.
How it connects
Connects evaluation to prompt engineering, system prompts, AI agents, benchmarks, tool use, and safe deployment.

Also explained in

Compare how 15 books explain evaluation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Introduction to Generative AI, Second Edition. The section links point to the parts of the book it draws on.