Unit 2/Lesson 2 of 3

Prompt Architecture & Output Schemas

A system prompt is a product specification. Output schemas are contracts between the model and your application. Getting these right is the PM's core technical skill in agent product development — and BuzzBoard's job posting explicitly calls it out.

SkillsPrompt engineeringOutput schema designStructured outputs
+30 XP
✏️ On desktop — select text to ask Nobi, save notes, or add thoughts

The system prompt as product spec

For a traditional software feature, a product spec tells engineers what to build. For an AI agent, the system prompt is the spec that tells the model how to behave.

A well-architected system prompt has distinct sections:

Role and persona — who is the agent? What is its purpose? This grounds all subsequent instructions. "You are Zylo, BuzzBoard's AI sales assistant. Your job is to research SMB prospects and draft personalized outreach for sales reps." The persona sets tone, formality, and authority scope.

Task instructions — step-by-step guidance on what to do. Not a vague direction like "research the prospect" but a structured process: (1) retrieve the IRIS profile, (2) identify the top 3 business challenges from their digital signals, (3) select the most relevant BuzzBoard value prop for each challenge, (4) draft outreach that connects their challenge to the value prop.

Constraints — what the agent must NOT do. Constraints are often more important than instructions. "Never fabricate information not present in the IRIS profile." "Never mention competitors by name." "Always keep outreach under 150 words." Without explicit constraints, models will fill gaps with their own defaults.

Output format — how the response should be structured. Should it return JSON? Markdown? A numbered list? If the output feeds into your application, it must be deterministic. Specify the exact format.

Examples (few-shot) — 2–3 examples of ideal input/output pairs calibrate the model's behavior more reliably than written instructions alone. For outreach drafting, include 2 examples of good outreach and 1 of bad outreach with explanations.

囲
Josekiじょせき

Established sequences of play — locally optimal moves both players know. System prompt patterns are joseki: proven structures that reliably produce good outcomes, refined by iteration.

Output schemas: structured outputs

An agent that returns free-form text is hard to integrate into a product. Your application can't reliably parse "Here are three outreach options for ACME Plumbing:" into a data structure.

Structured outputs force the model to return JSON (or another schema-constrained format) that your application can process programmatically. OpenAI, Anthropic, and Google all support structured output modes.

Designing an output schema is a product decision:

```json
{
"prospect_id": "acme-plumbing-oh",
"research_confidence": 0.87,
"top_challenges": [
{
"challenge": "Low review count vs. local competitors",
"evidence": "12 Google reviews vs. competitor average of 47",
"relevance_score": 0.92
}
],
"outreach_variants": [
{
"variant_id": "v1",
"subject": "15 new reviews in 30 days — here's how",
"body": "...",
"tone": "consultative"
}
],
"flags": {
"lowdataquality": false,
"needshumanreview": false
}
}
```

Each field is a product decision: Why include research_confidence? Because downstream you'll want to surface low-confidence prospects for human review. Why flags.needs_human_review? Because the agent should be able to escalate when it's uncertain.

The schema is the contract between the model and your application. Changes to the schema require coordination with engineering — treat it like an API contract.

Prompt versioning and iteration

Prompts are code. They need version control, testing, and a deployment process.

Version control — prompts should live in your codebase (or a prompt management system like LangSmith, PromptLayer, or Braintrust), not in a spreadsheet or someone's head. When you change a prompt, the old version should be recoverable.

Regression testing — every prompt change should run against a test suite of inputs and expected outputs before going to production. A change that improves average output quality by 5% but breaks behavior on 10% of inputs is worse, not better.

A/B testing — for high-volume agents (like Zylo sending thousands of outreach messages), prompt variants can be tested against each other on real traffic with outcome metrics (reply rates, meeting bookings) as the north star.

Prompt ownership — as PM, you should own the prompt spec. Engineers implement the integration; the AI team advises on model behavior; but the definition of what the agent should do is a product decision. If the prompt is owned by engineering or AI without PM input, it will optimize for technical convenience, not user value.

The BuzzBoard job posting explicitly calls out "design agent behaviors including prompt architecture" — this is not a nice-to-have PM skill for this role, it's a core responsibility.

Ask Nobiexplain

Select any text in the lesson to ask a question. Press Esc to close.

1 / 3

You're writing the system prompt for Zylo's outreach drafting module. Which component is most likely to be missing from a first draft that causes inconsistent real-world performance?