liveBook · Manning

Evaluation prompt

As explained in Build an AI Agent (From Scratch)

An evaluation prompt is instruction text that specifies how a model should answer a benchmark question and format its response.

An evaluation prompt tells a model how to respond to a benchmark question so its answer can be checked consistently. For GAIA questions, it asks the model to decide whether it can solve the problem, then return either a final answer or a reason it cannot answer. The answer must be a number, a short string, or a comma-separated list, with formatting rules that support comparison against ground truth. section 2.4.2

The prompt works alongside a structured response and an evaluation pipeline:

  • Set `is_solvable` first. Put a solvable response in `final_answer`; otherwise, explain the limitation in `unsolvable_reason`. section 2.4.2
  • Send the evaluation prompt as the system message and the benchmark question as the user message. Request the response schema, then compare `final_answer` with the ground truth using a case-insensitive exact match after trimming whitespace. section 2.4.2
Listing 2.11 Pydantic model for GAIA responses
from pydantic import BaseModel
class GaiaOutput(BaseModel):
    is_solvable: bool
    unsolvable_reason: str = ""
    final_answer: str = ""

The `GaiaOutput` schema makes `is_solvable` required while defaulting both answer strings to empty. That accommodates solvable and unsolvable responses without changing the response shape. section 2.4.2

A prompt for an evaluator has a different job: it tells a judge how to grade an agent’s answer. A rubric-based research evaluator receives the query, final answer, evidence excerpts and source metadata. Its prompt requires judgments based only on that evidence, PASS or FAIL for each rubric item, and a single JSON object. An unsupported claim fails even if it sounds plausible; a citation also fails when its excerpt does not support the claim. section 10.3.2

How Build an AI Agent (From Scratch) covers it

How deep it goes
Specifies GAIA answer rules and response fields, then shows how a system prompt feeds structured output and exact-match validation.
Examples
Uses a GAIA response schema and model-call pipeline, plus a research-agent judging prompt with an evidence pack and PASS/FAIL rubric.
What it assumes
Assumes familiarity with model messages and Python for the pipeline; supplies the prompt wording and response schema.
What you can do after
Build it from scratch: pair a GAIA-style prompt with a response schema and answer check, or specify an evidence-bound rubric prompt for a judge.
How it connects
Links structured output and exact-match validation with benchmark scoring; connects evaluator prompts to rubrics, evidence grounding, and citation checking.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build an AI Agent (From Scratch). The section links point to the parts of the book it draws on.