In 2026, everyone in AI is talking about Context Engineering.
It's already the core AI PM skill.
But just a few explain what the context is.
Save this template. It captures all scenarios and will help you maximize agents' performance:
1. Instructions
Define:
→ Who: Encourage an LLM to act as a persona
→ Why is it important (motivation, larger goal, business value)
→ What are we trying to achieve (desired outcomes, deliverables, success criteria)
If you remember one thing from this post, remember this: 𝗱𝗼𝗻’𝘁 𝗱𝗲𝗳𝗮𝘂𝗹𝘁 𝘁𝗼 𝗰𝗼𝗺𝗽𝗹𝗶𝗰𝗮𝘁𝗶𝗻𝗴 𝘆𝗼𝘂𝗿 𝗽𝗿𝗼𝗺𝗽𝘁𝘀. Providing strategic context helps AI understand your intent and make better decisions (arXiv:2401.04729)
2. Requirements (How)
Define:
→ Steps to take (reasoning, tasks, actions)
→ Conventions (style/tone, coding rules, system-design)
→ Constraints (performance, security, test coverage, regulatory)
→ Response format (JSON, XML, plain text)
→ Examples (positive/negative, responses/behaviors)
Negative examples might help you address issues identified during error analysis
3. Knowledge
Define:
→ External Context:
- Domain (strategy, business model, market facts)
- System (overall goals, other agents/services)
→ Task Context:
- Workflow (process steps, process, hand‑offs)
- Documents (specs, procedures, tickets, logs)
- Structured Data (variables, tables, arrays, JSON/XML)
4. Memory
An LLM can access:
→ Short-term memory
- Previous messages, chat history
- State (e.g., reasoning steps, progress)
→ Long-term memory
- Semantic (facts, preferences, user knowledge)
- Episodic (experiences, past interactions)
- Procedural (instructions from previous interactions)
Memory is not part of the prompt you can type. It can be automatically attached by the orchestration layer or accessed as a tool.
5. Tools
Provide description, what it does, how to use it, return value, parameters.
6. Tool results
Key to understand:
To call a function, an LLM uses a special format interpreted by the system. It’s like saying, “Please call this tool with these parameters."
Next, an orchestration layer responds by attaching a special message to the messages list.
—
Free examples (GitHub):
—
Find this helpful?
You might also like this Ultimate Guide to Context Engineering: productcompass.pm/p/con…
Want to pivot to AI PM?
I recommend the AI PM Certification. It’s a 6-week cohort by Miqdad Jaffer (Product Lead at OpenAI). I lead AI Builds Labs. The next session: Oct 18, 2025. Next cohort: January 26. $500 off: bit.ly/aipmcohort