liveBook · Manning

Prompt engineering

As explained in AI Governance

Prompt engineering is the practice of designing and refining instructions supplied to a model to shape its responses or behavior.

Prompt engineering shapes model behavior through instructions, without retraining or infrastructure changes. Prompts are a first filter, not a guarantee; testing and monitoring are needed to catch failures they miss. section 6.2.4

Make prompts operational and testable:

  • Replace vague requests such as “be fair” with specific instructions that define what the model must avoid. section 6.2.4
  • Constrain response formats with allowed values, required fields, and example answers; put the instructions in the system prompt. section 6.1.3
  • Evaluate prompt changes systematically, avoid relying on version-specific behavior, and pin model versions where possible. section 6.1.3

A testable fairness instruction

For a liability assessment, instruct the model: “Do not reference age, gender, or postcode.” This is more verifiable than asking the model to “be fair,” but still requires testing and monitoring. section 6.2.4 section 6.1.3

How AI Governance covers it

How deep it goes
Moves from specific instructions to structured outputs and optimization, while treating prompts as filters rather than guarantees.
Examples
Uses a liability instruction excluding age, gender, or postcode and structured eligibility outputs with defined fields and allowed values.
What you can do after
Apply it by writing testable instructions and output formats, then evaluate revisions with MLflow Prompt Optimization or Amazon Bedrock's prompt optimization feature.
How it connects
Connects prompt design to model selection, fairness testing, output monitoring, model configuration, and deterministic tools.

Also explained in

Compare how 51 books explain prompt engineering →

Related concepts

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