liveBook · Manning

Diagnostic lens

As explained in Prompt Engineering in Practice

A recurring analytical perspective for identifying why a prompt produces unreliable or unsuitable results.

A diagnostic lens is a reusable question for finding why a prompt fails, varies between runs, or produces plausible but unsuitable output. Check the prompt before assuming the cause is the model or an external factor. section 1.6 section 1.6.3

Use three questions to inspect a failing prompt:

When results vary, look for underspecification: multiple interpretations may fit the prompt. An output schema, constraint, or worked example can narrow that interpretive space. Some variance may instead come from sampling, so distinguish prompt issues from model-level controls. section 1.6.3

Support-ticket classification

If tickets using feature names classify reliably but user descriptions do not, add a reference mapping common descriptions to the internal product taxonomy. The missing context, rather than model malfunction, explains the inconsistent results. section 1.6.3

How Prompt Engineering in Practice covers it

How deep it goes
Defines three diagnostic questions and works through underspecification, while directing ambiguity and sampling issues to later treatments.
Examples
Uses support-ticket classification to show how mapping user descriptions to a product taxonomy closes a context gap.
What you can do after
Diagnose inconsistent prompt output by checking specification, missing context, and room for interpretation.
How it connects
Connects prompt specification with context, constraints, output schemas, ambiguity, and sampling.

This explainer was generated by Manning's knowledge graph from the text of Prompt Engineering in Practice. The section links point to the parts of the book it draws on.