Library · Summary & review

Practical LLM Evaluation

By Ammar Mohanna, Indrajit Kar and Zonunfeli Ralte. A discipline for deciding when an LLM product can ship: solid on method, with nothing measured about the judge.

FR EN
Practical LLM Evaluation for Production Systems book cover, Ammar Mohanna, Indrajit Kar and Zonunfeli Ralte

Practical LLM Evaluation

Practical LLM Evaluation for Production Systems: Measure, monitor, and improve AI system reliability across training and inference

6.4 /10

« A clear discipline for deciding on a release, an LLM judge treated as a noisy instrument, and, in the parts I read, no measurement of the judge. »

  • AuthorsAmmar Mohanna, Indrajit Kar, Zonunfeli Ralte
  • OriginalPackt, 2026 · ExpertEdge course version, 8 h 06
  • LanguageEnglish only
  • This page~9 min read
  • Read it Read on ExpertEdge Code : 50% off the yearly plan. Affiliate link: I earn a commission if you subscribe with this code. My ratings do not depend on it.
Book rating across 5 dimensionsIdeas6/10Practical7/10Readability6/10Aged well7/10Examples6/10

An operating manual for deciding when an LLM product can ship: evidence, thresholds, gates, closed loop. Solid on method, but nothing measured about the judge in the parts I read.

Why this book

My book notes and my articles go through LLMs that grade them. A reviewer reads, a writer fixes, a judge separate from the author gives the grade, and a blind judge never sees the one I proposed, so it can't anchor on it. I also steer code agents. One question keeps coming back: how do you know an LLM output is good, and that your measurement itself holds up?

This book tackles it at product scale. It is signed Ammar Mohanna, Indrajit Kar and Zonunfeli Ralte, published by Packt in 2026. I read the course version on ExpertEdge, Packt's subscription platform: 147 lessons, 8 h 06, eleven sections, about 969,000 extracted characters. The platform labels it Intermediate. My reading is targeted, and I own that. Sections 1 (foundations), 3 (text inference) and 8 (agents) I read in full, a little under a quarter of the text (about 224,000 characters). The other eight I skimmed through their opening sentences. They cover training, vision, mixtures of experts and OCR, off-topic for a product that calls a model through an API. The bridges to my own practice are mine, flagged as "My reading".

A customer-support assistant routes tickets, drafts replies and calls billing. One day it confirms to a customer a refund that was never processed, because it skipped the billing lookup. The reply sounded right, and nobody was checking behind it.

The ideas that stay

1Evaluation is a decision, not a score

A red light in continuous integration doesn't say "the code scores 7.3 out of 10", it says "we don't deploy". The authors want the same for an LLM: "evaluation is not a number; it is a decision system" (lesson 4). It has four parts. The evidence is what you measure, the uncertainty says how far you can trust it, the threshold is the boundary fixed in advance, the action is what you do when the boundary is crossed.

Example: ship if routing accuracy reaches 90% overall and 88% on every critical intent. Without a threshold, "metrics are not actionable, and releases become debates" (lesson 4). The numbers are illustrations: "the exact numbers are product-specific" (lesson 8). The book keeps two or three decisive metrics per axis (quality, safety, cost, reliability); the rest explains why they moved.

My reading

My review loops already have this skeleton. A threshold out of 100, a fidelity gate that blocks, a maximum of three rounds. What I'm missing is the uncertainty (idea 4).

2The right evaluator is the cheapest one that holds

Before paying for an LLM judge, ask whether a line of code can settle it. The book stacks four evaluators. Deterministic validators check what is true or false, like JSON that parses. Reference-based metrics compare against a label, like a ticket's category. The LLM judge, a model asked to grade another's outputs, covers the subjective. Humans keep the risky cases. The rule: "choose the cheapest evaluator that is reliable for the failure mode, then escalate only when needed" (lesson 11).

"The refund has been processed" is not a style problem. The validator reads the trace (the log of tool calls) and looks for a successful billing call before that sentence.

My reading

My citation checker, which looks up every sentence attributed to the book in the extracted text, is a deterministic validator. The judge keeps the rest.

3The LLM judge is a noisy instrument, versioned like code

A scale whose tare changes between two weighings tells you nothing about the flour. A judge's outputs are likewise "noisy measurements, not ground truth" (lesson 11). The book lists the flaws without putting numbers on them: inconsistency from one run to the next, sensitivity to the rubric (the grading grid given to the judge), a taste for long answers.

The remedy comes down to concrete habits. A fixed rubric, one dimension at a time, a simple scale, evidence quoted by the judge. Calibration, meaning comparing its grades with those of humans, with the advice to calibrate "against a small human-rated set" (lesson 11). Then version the model, the prompt and the rubric. If the judge changes, the old and the new one grade the same calibration set before anyone compares curves (lessons 17 and 58). One last trap, stated for vision-model judges but valid for text: a judge that hallucinates like the evaluated model "will confirm its hallucinations rather than catch them" (lesson 58). Hence a judge from another model family, or one calibrated on human judgments, with calibration tracked over time.

An honest limit: no bias rate, no quantified calibration protocol. Kappa (agreement between raters, corrected for chance) shows up in a single paragraph of the whole text, in passing during data annotation (lesson 70). The only threshold given is for a Krippendorff's alpha, at least 0.67, "subject to domain review".

My reading

My blind judge doesn't come from this book, but from my research on anchoring: a judge who sees a proposed grade clings to it. My home test points that way: over four published book notes, the mean error on the overall grade is 0.95 points when the reviewer sees a grade that is wrong by 1.5, and 0.4 for a judge blind to the proposed grade, using an anchored scale and comparing in pairs. A single pass, reference grades set by the AI (a few corrected by me) and not by independent humans: a hint, not proof. The book doesn't measure this effect for an LLM judge.

4Don't react to noise: interval and minimal change

8.10 then 8.18 proves nothing if two identical runs already differ by 0.2. The book gives every noisy metric a confidence interval, the range where the true value falls with a given probability. An accessible method is the bootstrap: you draw cases at random, with replacement, from those evaluated, recompute the mean, repeat, and the range comes out of the spread.

Before crying regression (a drop that justifies acting), the book asks four questions. Does the change exceed the run-to-run variation, and the minimal useful change, the smallest gap that would alter a decision? Is it concentrated in a critical slice? Does it cross a threshold? The real question is not "did the number move" but "did it move enough to change the decision" (lesson 13).

My reading

My book grades come from a single judge and a single pass, so they have no range. My 0.7 gap threshold between the writer and the judge is a crude version of this idea. Three passes would tell me whether my 0.7 is noise.

5The closed loop: every incident becomes a test case

Offline, a set of cases freezes the configuration and blocks a version that regresses. A canary (a release to a small share of traffic) then keeps watch. Online, you log, measure drift, and sample for review. Every incident goes back into the test suite: it becomes, the book says, "a memory of what broke before" (lesson 15). Without traces, "incidents remain anecdotes" (lesson 17).

Two clarifications helped me. The development set, which you keep tweaking, stays separate from the hold-out (the reserve set), which serves release decisions and on which you never tune anything, or you end up optimizing against your own exams. A gate that is too jumpy causes "rollback fatigue" (lesson 14) and the team raises the thresholds without analysis.

My reading

My file of reading traps is this regression set, fed by hand after each book note. The book tells me to give it an owner and a review.

6Output contract, bounded loop, claim tied to evidence

An online form rejects a made-up date before opening a file. The book demands the same of the model's output through a contract: expected fields and types, often in JSON. It sees in it "a control layer, not a quality metric" (lesson 32). It guarantees a usable output, not a correct one. Around it comes the reject-and-repair loop, in three rules: repair only when the repair is "strictly syntactic and safe", switch to a fallback when the meaning is ambiguous, cap the attempts. Every retry lengthens tail latency and cost (lesson 32).

# my own, with parse_json_object and contract_error from the book
raw = call_model(prompt)
for attempt in range(MAX_ATTEMPTS):
    obj = parse_json_object(raw)
    error = "invalid_json" if obj is None else contract_error(obj)
    if error is None:
        return obj
    if not syntactically_repairable(raw):   # trailing comma: yes. Doubtful meaning: no.
        break
    raw = repair(raw)
return fallback_on(error)                   # safe template, error code logged

The neighboring control is the strongest. "Refund confirmation is not a writing task": it is a claim that must rest on executed evidence (lesson 33). The gate ties the sentence to an indicator drawn from the trace, not to what the model says about itself. If the indicator is missing, you block the reply, fall back to a safe template and open an incident.

My reading

Requiring a fixed-format report from a reviewer, and capping at three rounds before switching model, is this pattern. The per-field tracking is worth copying: if the same field breaks often, you fix the instruction instead of masking it with retries.

7Evaluating an agent step by step

An agent that cancels an order can read a wrong status, pick the wrong tool, retry without progress, then cancel anyway. So the book splits evaluation into eight steps: input and state validation, action choice, execution, recovery, loop detection, completion, safety, latency and cost (lesson 102). The text is dry about it: saying "the agent failed" "is not a useful root-cause analysis" (lesson 102).

Four ideas come out of it.

  • The final state, not the trajectory: "the key evaluation point is not whether the agent exactly follows one reference trajectory" (lesson 102).
  • A tool failure gets classified (timeout, permissions, schema, malformed response) before you pick the remedy among six: bounded retry, another tool, ask the user, rollback, human, safe stop (lesson 102). The book only measures that the chosen remedy matches the failure type (lesson 103). Replanning (making a new plan after the failure) is graded separately.
  • A loop is spotted by repeated calls with the same arguments and no progress, or by an exceeded step budget.
  • Completion is not a Boolean: full success, partial, safe failure, unsafe failure, resolved by a human (lesson 105). Pushing completion can raise safety violations.
My reading

A transient outage gets retried, a permissions refusal goes to a human; that pairing is mine.

For a code agent, the final state is the test that passes without the test having been loosened. I'd like to carry the tool-failure classification over to my agents.

My take, honestly

I take away a discipline: a threshold written before the discussion, the cheapest evaluator first, a judge versioned like an instrument, an incident that becomes a test. None of that will age.

The reservations are frank. In the sections I read, nothing is measured: the numbers are example thresholds, and everything about the judge stays qualitative. The code in section 8 is pseudo-code with functions that are never defined, the code in section 3 runs almost as is. Each lesson recaps the previous one and announces the next, and the modules change terrain: invoices, medicine, e-commerce.

Against Chip Huyen's AI Engineering (the review, 8.2/10), the relationship is simple. Huyen explains why evaluation is hard and puts numbers on judge biases. This one shows how to go from "I looked" to "I decided to ship", without quantifying the judge's biases. Agentic Architectural Patterns (the review) names loop failures (collusion, divergence) without measuring them: this one supplies the gates and logs that would let you detect them. Section 8 is a guide to reading traces, not a harness (the code that replays cases and computes scores). The principles will hold, the book dates from 2026. The models used as illustrations (Fara-7B, xLAM, FunctionalGemma) will age fast, but no evaluation library is cited in the sections I read.

Odilon

Read it if

  • You put an LLM in a product and have no written rule for deciding that a version ships
  • You use an LLM judge without having calibrated or versioned it
  • You steer agents and want a grid for reading their traces, step by step

Skip it if

  • You are after benchmarks, quantified judge biases or a kappa protocol: read Huyen first
  • You train or fine-tune models: I barely read those sections, judge for yourself
  • You want evaluation code that runs: only the section 3 code comes close

This one comes after, as targeted reading of sections 1, 3 and 8.

Read it on ExpertEdge

This book is part of ExpertEdge, Packt's subscription for technical books. The code ODILON50 takes 50% off the yearly plan: the book on ExpertEdge. Affiliate link: I earn a commission if you subscribe with this code, and my ratings don't depend on it.

For going further

Source: ExpertEdge course version, 2026 (ISBN 9781808652493). Sections 1 (foundations), 3 (text inference) and 8 (agents) read in full, about 23% of the text, plus two paragraphs from lessons 58 and 70; the other eight sections skimmed through their opening sentences.

Comments (0)

Browse the whole library

More book notes coming: one book at a time, the marrow only.