Complete AI Training

Prompt framework course · 6 chapters · 17 min · certificate

Context Engineering and Structured Prompts

XML tags, LangGPT, the Prompt Canvas, ReAct and agent skills: how to give AI the right information, not just the right words.

What you'll learn

  • Curate the right context for AI assistants and agents
  • Separate instructions, context, examples, and input with tags
  • Build prompts using LangGPT and the Prompt Canvas
  • Write system prompts at the right altitude
  • Frame agents with goals, tools, and checks
  • Apply structured intent to ambiguous recurring tasks

Chapters

6 chapters · 16:35
  1. 2:54 01Start here Members From prompt to context This lesson explains what a prompt framework is, then shows how context engineering moves you from writing one prompt to curating everything the model sees, especially for assistants and agents that work over many turns.
  2. 2:51 02Structure Members Structure with tags and sections This lesson teaches you to separate instructions, context, examples and input with consistent tags, and to nest documents with source metadata so the AI reads each part in its proper role.
  3. 2:44 03Templates Members LangGPT and the Prompt Canvas This lesson teaches LangGPT and the Prompt Canvas, two 2024 templates that structure prompts into named sections and one page maps, and shows how they shaped today's skill files and system prompts.
  4. 2:40 04System prompts Members The right altitude for system prompts This lesson teaches how to write system prompts at the right altitude, using canonical examples, a small set of non-overlapping tools, and just in time references instead of pasted content.
  5. 2:35 05Agents Members ReAct, tools and agent skills This lesson teaches the ReAct loop of thought, action and observation, and how to frame agents with goals, tools and checks instead of typing the loop yourself.
  6. 2:51 06Apply it Members Structured intent for ambiguous work This lesson teaches when to apply structured intent, how to build a 5W3H system prompt for a recurring fuzzy task, and how to test it on ten real cases.

Study guide

Context Engineering and Structured Prompts

This course teaches you how to move beyond writing a single clever prompt and start curating the full set of information an AI model sees. You will learn to separate instructions, context, examples, and input with consistent tags, so the model reads each part in its proper role. You will also explore two influential templates from 2024, LangGPT and the Prompt Canvas, and see how they shaped today's skill files and system prompts. The course then shows you how to write system prompts at the right altitude, using canonical examples and just in time references instead of pasted content. Finally, you will learn the ReAct loop of thought, action, and observation, and how to frame agents with goals, tools, and checks. Throughout, you will work with real job examples, such as drafting a launch email or building a recurring report, so you can apply each idea immediately.

This course is for power users and builders who create system prompts, assistants, skills, agents, and automations. If you already paste prompts into ChatGPT, Claude, or Gemini and want more reliable results on complex, multi turn work, this is for you. You do not need to be a programmer. You need to be willing to think about what the model needs to know, and when, rather than just what you want to say. By the end, you will have a repeatable method for structuring context, testing it on real cases, and knowing when to keep things simple. You will also learn the common mistakes, like over structuring simple tasks or filling context with irrelevant material, so you can avoid them.

What is a prompt framework?

A prompt is the request you type into an AI tool such as ChatGPT, Claude or Gemini. A prompt framework is a reusable structure for that request: a short checklist of the parts a good prompt contains, usually named with an acronym so it is easy to remember. Why it helps: the AI fills in whatever you leave out with generic guesses. A framework makes sure you include the parts that change the answer, such as who it is for, what you want to achieve and the format you need.

Frameworks make prompts repeatable: you fill the same parts each time, save the prompt as a template and share it with colleagues. They are not magic words: the value comes from the detail you put in each part. They help most when a request is complex or open to interpretation; a quick, simple question can stay short. There are well over sixty named frameworks, and most of them remix the same ingredients: role, task, context, audience, format, constraints and examples.

In this course you learn Context engineering, which is the next level of prompt frameworks: structured prompts and context engineering for assistants, agents and automations. It is best for: power users and builders: system prompts, assistants, skills, agents and automations.

From prompt to context

Context engineering is the practice of choosing the optimal set of information a model sees. It is broader than writing a single prompt. It covers instructions, conversation history, files, tool results, and the current message. The key question shifts from what do I say to what does the model need to know, and when. The what is about relevance. The when is about timing across turns. This matters most for assistants and agents that work over many turns with tools and files, because their context accumulates and can fill with stale material.

A system prompt defines the standing context. Slots like role, audience, knowledge sources, rules, and out of scope are the pieces you curate before any conversation starts. For example, if you are building an assistant to help with HR policy questions, you might name the policy document, set the audience as new employees, and cap answers at three sentences. That is curating, not maximising. Naming the right file and capping the answer length is often better than pasting everything you have.

The common mistake is treating context as a bucket to fill. Irrelevant context dilutes the relevant parts and makes the model slower and less accurate. If you paste a hundred pages of policy into the prompt, the model may miss the one clause that matters. Instead, select the few sources that are most relevant and let the model ask for more if needed. This lesson teaches you to think like a curator, not a collector.

Structure with tags and sections

Tag separation means every part of your prompt sits in its own labelled section. When instructions, context, examples, and input are mixed together, the AI has to infer roles and often gets them wrong. For instance, if you write a prompt that says, Summarise this article in three bullets, and then paste the article, the model might treat the instruction as part of the article. Using tags like <instructions> and <article> removes that ambiguity. Consistent tag names across prompts make them easier to maintain and test. If you always call a section instructions, you can swap the input and trust the rest of the prompt to behave the same way.

Source metadata inside a document tag tells the AI who wrote the document, when, and where it came from. This lets the AI weigh conflicting documents by origin rather than treating them as equally reliable. For example, a policy from 2019 and a policy from 2024 might contradict each other. If you tag each with a date and author, the model can prefer the newer one or flag the conflict. Nesting means putting a document tag inside a larger structure, with its source, title, and body as separate parts. This keeps the document distinct from the rules you are applying to it.

Testing depends on stable structure. When tag names change between prompts, any comparison you made before is no longer valid, and you have to rebuild your test from scratch. Reuse is the payoff. A well tagged prompt can be copied into a new task, with only the input section swapped, because the instructions and context stay in their own clearly labelled boxes. This lesson gives you a practical tagging scheme you can use in any AI tool.

LangGPT and the Prompt Canvas

LangGPT treats a prompt like a programming language with eight sections: Profile, Goal, Constraint, Workflow, Initialization, Examples, Skill, and Style. Each section has a clear role, so the AI can find instructions quickly. This reduces ambiguity in complex tasks. For example, a LangGPT prompt for a customer support assistant might have a Profile section describing the assistant as friendly and patient, a Goal section stating that it should resolve billing questions, and a Constraint section saying it must never promise refunds. The Prompt Canvas puts four pairs on one page: persona and audience, task and steps, context and references, output and tone. It is faster to fill in than LangGPT and works well for everyday business prompts. The visual layout helps you spot missing information.

Both templates are the ancestors of today's skill files and system prompts. Modern AI tools often show a system prompt with sections that mirror LangGPT. When you fill in a persona box, you are using the Canvas idea. A skill file is a reusable prompt template that you can apply to many tasks. LangGPT and the Canvas make good skill files because their sections stay the same while the content changes. This saves time and keeps quality consistent. For instance, a weekly report skill file might have a fixed Goal and Constraint section, while the Examples section changes each week.

The biggest mistake is vague slots. If a section says be helpful or do good work, it adds no value. Each slot needs a concrete, checkable instruction. Specific roles, goals, and constraints give the AI something to follow. You can combine both templates. Start with the Canvas to plan the four pairs, then expand into LangGPT sections for complex tasks. This gives you a fast first draft and a thorough final prompt. Use the right level of detail for the job.

The right altitude for system prompts

The right altitude means a system prompt that is neither a rigid rulebook nor vague guidance. It explains the goal and trusts the model to adapt to cases you did not list. For example, instead of writing a rule for every possible customer complaint, you might say, Resolve the customer's issue in a polite and concise way, and escalate to a human if the issue involves a refund over 100 dollars. This gives the model room to reason while keeping boundaries. Use canonical examples instead of exhaustive edge cases. Two or three examples that show the shape of a good answer teach more than a long list of special rules.

Keep your tools small and non-overlapping. If two tools do almost the same job, the model will pick the wrong one, so give each tool one clear purpose. For instance, if you have a tool to search the knowledge base and a tool to search the web, make sure their descriptions make clear when to use each. Load information just in time by reference. Give file paths or links and let the model read what it needs, rather than pasting everything into the prompt up front. This keeps the prompt short and current.

Over-specifying is the most common failure. A rule for every scenario breaks the moment reality throws in something new, so leave room for the model to reason. A short prompt that points to current sources stays accurate over time. A long prompt stuffed with pasted content goes stale and buries the model in unused text. This lesson shows you how to find the right balance for your own system prompts.

ReAct, tools, and agent skills

ReAct, published by Yao and colleagues in 2022, interleaves reasoning and acting. The model produces a thought, takes an action, reads the observation, then repeats until the goal is met. This is the native loop of modern agents. You no longer type the loop. You supply the goal, the tools the agent may call, and the checks that define good work. A stop rule tells the agent when to hand control back to you. For example, an agent that researches competitors might have a goal to find three recent product launches, tools to search the web and read pages, and a stop rule to return after five minutes or three launches.

Tool choice is a safety decision. Give the smallest tool set that completes the task. An agent that can read files and write a draft does not also need to send email. Long work needs context hygiene. Notes keep decisions outside the conversation, compaction summarises old turns, and sub-agents work in a clean context and return only findings. Agent skills package instructions and files that the model loads when needed. A brand voice guide or report template can sit closed until the moment the agent requires it.

Checks turn an agent from a guesser into a worker. Require every number to trace to a source, and ask the agent to flag anything it cannot verify. For instance, if the agent produces a sales figure, it must cite the file and line where it found that figure. If it cannot, it should say so. This lesson teaches you how to design agents that are useful and safe, without writing code.

Structured intent for ambiguous work

The 5W3H studies in 2026 found that structured intent improved alignment on ambiguous business tasks but not on simple ones, so the value depends on the task, not the framework. Ambiguous tasks share three traits: many valid answers, high stakes, and room for people to disagree on the goal. These are the requests worth structuring. For example, writing a strategy memo is ambiguous. Rewriting a sentence is not. A structured system prompt built once for a recurring job becomes a reusable asset, and testing it on ten real cases shows you which slot needs tightening.

Over structuring simple work adds noise without improving the answer, so keep quick rewrites and summaries as plain, short prompts. The 5W3H frame works as a pre writing checklist: who, what, when, where, why, how, how much, and how the answer will be judged. For a recurring task like a monthly performance report, you might build a system prompt with sections for each of these. Then you test it on ten real reports from past months to see where it fails.

Across the course, context engineering is the through line: readable context, clear structure, the right altitude, and intent that matches the task. This lesson helps you decide when to apply structure and when to keep things simple. You will leave with a reusable system prompt for one of your own recurring fuzzy tasks, tested on real cases.

Frequently asked questions

What is context engineering in simple terms?

Context engineering is choosing the best set of information to show an AI model. It includes instructions, history, files, and tool results. The goal is to give the model what it needs to know, when it needs to know it, rather than filling a bucket with everything.

Do I need to know how to code to use these techniques?

No. The course focuses on writing and structuring prompts in plain English. You will use tags, sections, and templates that work in ChatGPT, Claude, and Gemini. The agent skills part explains concepts like tools and checks without requiring programming.

What is the difference between LangGPT and the Prompt Canvas?

LangGPT is a detailed template with eight sections like Profile, Goal, and Constraint. The Prompt Canvas is a one page map with four pairs: persona and audience, task and steps, context and references, output and tone. The Canvas is faster for everyday prompts, while LangGPT suits complex tasks.

When should I use structured intent like 5W3H?

Use structured intent for ambiguous tasks that have many valid answers, high stakes, and room for disagreement on the goal. For simple rewrites or summaries, a plain short prompt is better. The 5W3H frame helps you plan before writing a system prompt.

How do I test a system prompt?

Test it on ten real cases from your work. Look for where the output misses the mark and trace that back to a vague or missing slot in your prompt. Tighten that slot and test again. Stable tag names make it easier to compare versions.