PILOT — Private preview. Progress is saved for this browser session only.
HaiPhai.AI Fluency for Biotech

Writing System Prompts for Named Agents

Lesson 3~17 min1-question check

Module 16 · Lesson 03

Writing System Prompts for Named Agents

Reading time: 17 minutes Track: Yungsten Tech Employee Curriculum · Engineer path


The system prompt is the agent

An agent's system prompt is its identity, its expertise, its constraints, and its operating instructions — all in one place. A weak system prompt creates an agent that's inconsistent, over-reaches, and frustrates users. A strong system prompt creates an agent the team relies on.

The five-section system prompt structure

Section 1: Identity and role

Give the agent its name and its primary function in 2-3 sentences. This grounds every response.

You are Scout, Acme Corp's business development proposal assistant.
Your job is to draft the executive summary section of proposals.
You have deep familiarity with Acme's positioning, voice, and differentiators.

Section 2: Expertise and context

What does the agent know that a generic Claude wouldn't? Client-specific context, industry knowledge, terminology, organizational context.

Acme Corp builds enterprise data integration software for regulated financial institutions.
Their primary differentiators are: SOC2 Type II certification, sub-100ms latency guarantees,
and a 24/7 white-glove implementation team. Competitors typically mentioned: Fivetran, Airbyte, Stitch.
The proposal voice is: confident, evidence-based, no hype, specific over general.

Section 3: Operating instructions

How the agent should behave. Step-by-step process if applicable.

When drafting an executive summary:
1. Open with the client's specific pain point (use the discovery notes provided)
2. State Acme's solution in one sentence
3. Provide 2-3 evidence-based differentiators relevant to this client's situation
4. Close with a forward-looking statement about the engagement

Length: 200-300 words. Tone: confident, specific, no fluff.

Section 4: Constraints and limits

What the agent must not do. The harder boundaries.

Do not:
- Claim technical capabilities without explicit confirmation in the provided context
- Promise timelines or SLAs — flag these for the BD rep to confirm
- Include pricing without explicit instruction
- Write content that implies we have worked with specific named clients unless the context confirms it
Mark any claim you're uncertain about with [VERIFY: reason].

Section 5: Output format

Specify exactly what the output should look like. Format, length, structure, tone.

Output format:
- Plain paragraphs (no headers)
- 200-300 words
- No bullet points in the executive summary section
- End with a blank line followed by: "--- [SCOUT: Review the [VERIFY] flags before sending] ---"

Testing the system prompt

A system prompt isn't done until it's been tested with at least five representative inputs from the actual user.

Test cases to run:

  1. Happy path: typical good input, verify output matches spec
  2. Missing input: what happens when key context is missing?
  3. Edge case: unusual or complex input that the operator might actually encounter
  4. Constraint test: input that should trigger a [VERIFY] flag or refusal
  5. Off-topic: ask the agent something outside its scope — does it handle it gracefully?

Document the test results alongside the system prompt. They become part of the wiki entry.

Iteration process

System prompts are not set-and-forget. Plan for at least one revision after the agent has been in real use for 2-3 weeks. Common revision triggers:

  • Operators report consistent output patterns that aren't right
  • The agent is being used for cases outside its original scope (update constraints or expand scope deliberately)
  • The client's context has changed (new competitor, updated positioning, process change)

Treat the system prompt as a living document. Version it in the wiki.

Knowledge check

1 question · select an answer to see if you got it
1.The constraints section of a system prompt should include:
Prompt Exercise

Write the system prompt for 'Mia,' an agent for a law firm's contract review team. Mia's job: identify non-standard indemnification clauses in vendor contracts and explain them in plain language. The firm represents mid-market companies; their clients are non-lawyers.

Hints
  • Give Mia a clear identity and primary job
  • Include what Mia knows that generic Claude wouldn't
  • Include firm constraints about what Mia must not do (e.g., give legal advice)
Ready to apply this?
Practice with AI →

Bring a real challenge from your work — the AI will help you apply what you just learned.