liveBook · Manning

Prompt framework

As explained in Context Engineering

A repeatable structure specifying the information and instructions a prompt contains and their order.

A prompt framework is a repeatable structure for organizing the information, instructions, and context sent to an LLM. Fixing the elements and their order makes prompts easier to template, version, and compare across runs. section 6.4

A 10-part structure moves from broad, stable context toward specific, dynamic instructions:

  • Task context: persona, domain, and goal; tone context: communication style. section 6.4.1
  • Background data: documents, schemas, or policies; detailed task description: instructions and operational constraints. section 6.4.1
  • Examples demonstrate desired behavior or format; conversation history supplies state for a multi-turn interaction. section 6.4.1
  • The immediate request focuses the current turn; reasoning guidance specifies checks to perform without requesting a reasoning trace. section 6.4.1
  • Output formatting defines the required structure; an optional prefilled response provides a skeleton to complete. section 6.4.1

Ordering supports context engineering: stable material comes first for reuse and caching, while history, the immediate request, and output constraints sit nearer the generated tokens. For reasoning guidance, specific checks are preferred over a generic instruction to think step by step. section 6.4.1

Listing 6.1 Example of a user prompt following the 10-step prompt structure
Task context: You are assisting a customer support team.

Tone context: Clear and empathetic.

Background data: Refund policy: refunds are allowed within 30 days.

Detailed task description and rules: Write a short reply explaining whether
a refund is possible. Do not exceed 50 words.

Examples: Style: "Thanks for reaching out. Here's what I can do."

Conversation history: Q: "I bought an item 40 days ago. Can I get a refund?"

Immediate request: Respond to the user.

Reasoning guidance: Verify the purchase date against the policy before
answering.

Output formatting: One short paragraph.

Prefilled response: "Here's your refund update: ____"

See the structure applied to a customer-support refund reply, with policy context, a purchase-date check, and a word limit. section 6.4.1

How Context Engineering covers it

How deep it goes
Defines ten prompt components and explains their ordering, caching implications, and specific-check guidance.
Examples
Uses a customer-support refund request with a 30-day policy, a 40-day-old purchase, and a short-reply constraint.
What you can do after
Apply a 10-part structure to make prompts repeatable, versionable, and comparable across runs.
How it connects
Connects prompt frameworks to context engineering and evaluation through reusable context and comparable prompt runs.

Also explained in

Compare how 2 books explain prompt framework →

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