Forward Deployed Product Manager
5. AI Product Judgment
Choose and prototype the right AI approach: prompting, RAG, tools, MCP and agents.
5.1 – Prompting fundamentals (link to this section)
System/user/developer instructions, task decomposition, few-shot examples, constraints and output formatting.
Prompting fundamentals
The instruction layer that shapes everything the model does next.
The Core Idea
Vague instructions produce vague, inconsistent outputs. Effective prompting decomposes a task clearly: system instructions set the model's role, user instructions state the specific request, and examples show the desired output format.
Task Decomposition
Break a complex request into explicit steps rather than one large ambiguous ask. A model asked to "analyze this and write a report" performs less reliably than one walked through: extract the key facts, identify the pattern, then draft the summary.
Few-Shot Examples
Showing 2-3 examples of the exact input/output pattern you want is often more effective than describing the pattern in words — the model can pattern-match directly instead of inferring your intent from a description.
Constraints & Output Formatting
State what the model should NOT do as explicitly as what it should. Specify the exact structure expected (JSON, a list, a specific length) rather than assuming the model will infer a reasonable default.
The Building Blocks at a Glance
| Element | What it does | Common mistake |
|---|---|---|
| System instructions | Sets role and boundaries | Left too generic to actually constrain behavior |
| Task decomposition | Breaks work into explicit steps | One large ambiguous ask instead |
| Few-shot examples | Shows the exact desired pattern | Description instead of demonstration |
| Output format | Specifies exact structure | Assumed rather than stated |
Where This Shows Up in the Field
A prompt asking a model to "summarize this document" with no further guidance and getting an inconsistent length and format each time is a prompting gap, not a model limitation — the fix is adding explicit constraints, not switching models.
5.2 – Advanced prompting (link to this section)
Diagnose bad prompts, improve instructions, manage examples, hierarchy, long context and complex tasks.
Advanced prompting
Diagnosing a bad prompt is a different skill than writing a good one.
The Core Idea
When a prompt underperforms, the fix usually isn't "try a completely different prompt" — it's diagnosing which specific element is failing.
The Usual Suspects
Unclear instructions, poorly chosen examples, missing hierarchy (which instructions take priority when they conflict), or context that's too long and burying the actual task — each produces a different failure signature.
Isolate One Variable at a Time
Change only the examples and re-test, then only the instructions, then only the length. Random full rewrites make it impossible to know what actually fixed — or broke — the output. This mirrors the eval-set discipline from later in this section.
Instruction Hierarchy
When system, developer, and user instructions conflict, the model has to resolve priority somehow — and if you haven't specified which wins, the resolution is effectively random from your perspective. Being explicit about priority removes that ambiguity.
Where This Shows Up in the Field
A prompt that worked well suddenly underperforms after a small edit — isolating exactly what changed, rather than rewriting from scratch, is what finds the actual cause in minutes instead of hours.
5.3 – Context engineering (link to this section)
Determine what information the model needs, how context should be structured and what should be retrieved versus supplied directly.
Context engineering
What the model needs to see, and what should stay out.
The Core Idea
Context engineering decides what information reaches the model on a given call: what should be retrieved dynamically, what should be supplied directly as fixed instructions, and what should be deliberately excluded.
Retrieved vs. Supplied
Information that changes per-request (a specific customer's account history) should be retrieved dynamically. Information stable across all requests (the system's role, core rules) should be supplied directly. Getting this split wrong means either stale fixed context or unnecessary retrieval overhead.
What Stays Out Matters as Much as What Goes In
Irrelevant or excessive context degrades output quality as much as missing context does — a lesson that compounds with RAG later in this section, where retrieving too much is as much a failure mode as retrieving too little.
A Practical Split
| Information type | Treatment |
|---|---|
| System role, core rules | Supply directly, fixed |
| Per-request customer data | Retrieve dynamically |
| Irrelevant historical detail | Deliberately exclude |
Where This Shows Up in the Field
A system that hardcodes a specific customer's account details directly into every prompt, rather than retrieving them per-request, produces context that goes stale the moment that customer's data changes.
5.4 – Prompt evaluation (link to this section)
Compare prompt variants against a defined eval set and identify quality regressions.
Prompt evaluation
"It feels better" is not a measurement.
The Core Idea
Comparing prompt variants requires a defined evaluation set — a fixed collection of representative inputs with known-good expected outputs — so you can measure whether a change actually improved quality.
Building an Eval Set
Real, representative inputs — not hand-picked easy cases — paired with a defined standard for what a correct or acceptable output looks like. This is the same discipline Section 6 formalizes for full production evaluation; this lesson is where it starts, at the prompt level.
Catching Regressions
A prompt change that improves one type of query can silently degrade another. Running the full eval set after every change, not just spot-checking the case you were optimizing for, is what catches these regressions before they reach production.
Where This Shows Up in the Field
Spot-checking a single example after a prompt tweak feels fast, but it only tells you about that example — it says nothing about the query types you didn't happen to check.
5.5 – RAG fundamentals (link to this section)
Embeddings, chunking, vector search, hybrid search, metadata, reranking and grounding.
RAG fundamentals
Giving a model access to facts it wasn't trained on.
The Core Idea
Retrieval-Augmented Generation retrieves relevant information from an external source and includes it in the model's context, so answers can be grounded in current, specific, or proprietary data the model never saw during training.
The Pipeline
Embeddings turn text into numerical vectors representing meaning. Chunking splits documents into retrievable pieces. Vector search finds chunks similar in meaning to the query. Reranking reorders retrieved results by relevance before they reach the model.
Hybrid Search & Grounding
Hybrid search combines vector similarity with traditional keyword matching, catching cases pure semantic search misses. Grounding means the final answer is actually based on the retrieved content, not just loosely influenced by it — a distinction the next lesson's diagnosis work depends on.
(Sequence / arrow flow)
Where This Shows Up in the Field
This is the direct answer to "why doesn't the model know about our internal documents" — it doesn't, unless a retrieval system puts the relevant content in front of it at query time.
5.6 – RAG architecture & diagnosis (link to this section)
Determine whether failures come from ingestion, chunking, retrieval, reranking, context, prompting or the model.
RAG architecture & diagnosis
When RAG returns a wrong answer, where's the actual failure?
The Core Idea
A RAG failure can originate at any stage of the pipeline: bad ingestion, poor chunking, weak retrieval, missing reranking, context issues, prompting problems, or a genuine model limitation.
Working the Pipeline in Order
Jumping straight to "the model is wrong" and trying a different model wastes time if the actual failure is upstream — in retrieval or chunking. Checking each stage in sequence isolates the real cause instead of guessing at the least likely explanation first.
The Diagnostic Sequence
Ingestion (was the source loaded correctly) → chunking (was information split awkwardly) → retrieval (was the right chunk found) → reranking (was it ranked high enough to be included) → context (did the model see it clearly) → prompting → model.
(Decision tree)
Where This Shows Up in the Field
A customer reporting "the answers are wrong" under time pressure is exactly when the temptation to guess is strongest — and exactly when working the chain methodically finds the real cause fastest, a pattern Section 9 revisits under live production pressure.
5.7 – Choosing the lever (link to this section)
Decide between prompt engineering, context engineering, RAG, fine-tuning, workflow or agent architecture.
Choosing the lever
Prompting, RAG, fine-tuning, or agents — how do you actually decide?
The Core Idea
Each technique solves a different kind of gap. Start with the cheapest, fastest lever and only escalate once you've confirmed the simpler approach genuinely can't solve the problem.
What Each Lever Actually Fixes
Prompt engineering fixes instruction clarity. Context engineering fixes what information the model sees. RAG fixes missing external knowledge. Fine-tuning fixes a persistent behavior or style prompting won't reliably follow. Agent architecture fixes the need for multi-step autonomous action.
The Escalation Order
Prompting → context engineering → RAG → fine-tuning → agents. Each step up costs more in complexity, latency, and maintenance — reaching for a complex lever before ruling out a simple one is the most common overcorrection in this work.
(Sequence / arrow flow)
Where This Shows Up in the Field
A team jumping straight to fine-tuning before trying prompt or context improvements is usually solving a problem an inexpensive fix would have handled — worth a direct question before committing to the expensive path.
5.8 – Structured outputs & workflow seam (link to this section)
Schema enforcement, validation and failure handling — how model output becomes usable inside a real workflow.
Structured outputs & workflow seam
The point where free-form model output becomes usable code.
The Core Idea
A model's raw text output isn't directly usable by downstream systems. Structured output enforcement ensures the model's response is a specific, parseable shape, validated before it flows into the rest of the workflow.
Schema Enforcement
A schema defines the exact fields and types expected — a JSON object with defined structure, not free-form prose the rest of the system has to parse heuristically.
Handling Failure at the Seam
Even with schema enforcement, a model can occasionally produce invalid output. The workflow needs explicit validation and a defined failure path — retry, fallback, or flag for human review — at this seam, not an assumption that structured output is always perfectly formed.
Where This Shows Up in the Field
A downstream system silently breaking on malformed model output is almost always a missing validation step at this seam, not a fundamental flaw in structured output as an approach.
5.9 – Agent vs workflow (link to this section)
Decide whether a problem requires a simple LLM, RAG, deterministic workflow, tool-using system or autonomous agent.
Agent vs workflow
Not every problem needs an autonomous agent.
The Core Idea
A simple LLM call answers a single question. A deterministic workflow chains fixed steps in a known order. An autonomous agent decides its own next steps, potentially looping and adapting its plan. Choosing the wrong one adds needless complexity or forecloses needed flexibility.
The Decision Test
Is the sequence of steps knowable and fixed in advance? If yes, a deterministic workflow — with tool calls where needed — is simpler, more predictable, and easier to debug than an agent. Reach for agent autonomy only when the path genuinely can't be predetermined.
Is the sequence of steps fixed and knowable?
(Decision tree)
Why This Choice Matters More Than It Looks
An agent given a task that actually has a fixed sequence doesn't just add unnecessary complexity — it adds unpredictable failure modes (unbounded loops, unnecessary tool calls) to a problem that never needed that flexibility in the first place.
Where This Shows Up in the Field
When an engineer proposes an agent for a task with a clearly fixed sequence, that's worth a direct question: what part of this actually needs to be decided at runtime, versus already known?
5.10 – Agent architecture (link to this section)
Reason about tools, memory, state, planning, permissions, autonomy, loops and human intervention without needing to implement the entire system.
Agent architecture
The core pieces of an autonomous system, without needing to build one yourself.
The Core Idea
Reasoning credibly about agent architecture means understanding its core components well enough to ask the right questions of the engineer building it — not writing the framework code yourself.
The Core Components
Tools (what the agent can do), memory (what it retains across steps), state (what it currently knows), planning (how it decides next steps), permissions (what it's allowed to do), autonomy level (how much runs without human check-in), and loop handling (what stops it from repeating indefinitely).
The Component Checklist
| Component | The question worth asking |
|---|---|
| Permissions | What can each tool call actually do, and what's it restricted from? |
| Loops | What stops this from repeating indefinitely on a bad path? |
| Autonomy level | Where is a human required to approve before action? |
| Memory/state | What does the agent retain between steps, and what resets? |
Where This Shows Up in the Field
You don't need to write the agent framework code. You need to ask whether an unbounded loop is possible, what permissions each tool call carries, and where a human is required to approve — informed questions that catch real risks before they reach production.
5.11 – Prototype to settle an argument (link to this section)
Build a rough working system that resolves a customer disagreement in an afternoon. Ship: working prototype.
Prototype to settle an argument
Sometimes the fastest way to align is to build the thing, not debate it.
The Core Idea
When stakeholders disagree about whether an approach will work, a rough, working prototype built in an afternoon often resolves the argument faster than another round of discussion.
Why a Prototype Beats a Debate
A prototype replaces speculation with something people can actually try. Two stakeholders arguing about whether an approach "would feel too slow" resolve the question instantly once they've used a working version — no further argument needed.
Speed and Scope Over Polish
The goal isn't production quality — it's a fast, disposable build that answers the specific question in dispute. Narrow scope matters more than completeness here; the prototype's job is to end an argument, not become the shipped product.
Where This Shows Up in the Field
Recognizing when a disagreement is actually a "let's just build it and see" situation — rather than continuing a debate that a working example would settle in an afternoon — is a judgment call worth developing deliberately.
Ship: Working Prototype
Build a rough, disposable prototype that resolves the specific stakeholder disagreement in dispute. Speed and narrow scope over polish — the goal is ending the argument, not shipping the final product.
Practise this chapter in the workspace
Reading is the map. Every section above also runs as a hands-on workspace session with tools, exercises and a recap quiz.
Start Learning for Free