liveBook · Manning

Prompt framework

As explained in Introduction to Generative AI, Second Edition

A prompting framework is a reusable template or structured method for applying prompt-design principles across tasks and domains.

A prompt framework is a reusable recipe for composing prompts instead of designing each one from scratch. It organizes principles such as clarity, relevant context, iteration, and conversational continuity so prompts can be applied more consistently across tasks, audiences, and domains. section 7.5 section 7.4

Common frameworks emphasize different kinds of control:

  • ReAct (reasoning and acting) alternates model reasoning with external actions such as tool or application programming interface (API) calls, then uses the returned results. section 7.5
  • MECE (mutually exclusive, collectively exhaustive) organizes an answer into non-overlapping categories that together cover the problem space. section 7.5
  • PACT structures a prompt around persona, action, context, and tone, while WISER uses who, instruction, subtask, examples, and review. section 7.5
Table 7.4 Example prompting frameworks for systematic prompting

Framework

Description

Example

ReAct (reasoning + acting)

Combine reasoning steps with tool or API calls

“I need flight options for Austin → call flight API → evaluate results → recommend itinerary.”

MECE

Organize outputs into non-overlapping, complete categories

“List customer segments using a MECE structure: Demographic, Behavioral, Geographic, Psychographic.”

PACT

Template: persona, action, context, tone

“You are a luxury fashion marketer. Draft Instagram captions for sustainable leggings in an aspirational tone.”

WISER

Template: who, instruction, subtask, examples, review

“You are a product manager → Summarize product launch → List key features and reactions → Provide sample summaries → Review for completeness and clarity.”

Compare each framework’s structure, purpose, and example prompt in one view. section 7.5

Frameworks can improve alignment between user intent and model output, but they are not universal requirements: capable models may need less prompting structure. Effective use still requires evaluating sample responses, scoring results, and iterating; some tasks may be better served by post-training or a hybrid approach. section 7.13 section 7.4

How Introduction to Generative AI, Second Edition covers it

How deep it goes
Defines several frameworks and gives examples, but stops short of implementation details or a full evaluation procedure.
Examples
Uses trip planning with a flight API, customer segmentation, fashion captions, and product-launch summaries as framework examples.
What it assumes
Assumes familiarity with prompts and model outputs while remaining accessible to non-experts seeking greater control over tone and structure.
What you can do after
Apply it to construct more consistent prompts and evaluate whether their outputs align with a task’s intended structure.
How it connects
Connects prompt engineering with zero-shot prompting, few-shot prompting, multi-turn prompting, tool calling, and model evaluation.

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.