Prompt Engineering for AgentSea

Master the art of communicating with AI agents — from vague requests to production-ready prompts for healthcare administration.

🎯 Interactive 🏥 Healthcare Admin 🇸🇬 Singapore Context ⚡ AgentSea Platform

🎯 The 4 Pillars of Effective Prompts

Every great prompt stands on four foundations. Master these and your AgentSea agents will deliver consistent, actionable results.

🔍

Clarity

Be specific about what you want. Replace vague verbs ("look at", "check") with precise actions ("assess SLA compliance", "calculate variance").

📚

Context

Give the agent the data it needs. Include relevant numbers, policies, timelines, and constraints — don't assume it knows your situation.

👤

Role Assignment

Tell the agent WHO it is. A "Senior Procurement Analyst with 10 years in Singapore healthcare" writes differently than a generic assistant.

📐

Output Framing

Specify the format you need. Tables, ratings (GREEN/AMBER/RED), bullet points, or structured reports — tell the agent exactly how to present results.

4 Types of Context

Type What It Is Healthcare Example
Domain Industry knowledge & regulations MOH infection control guidelines, PDPA data protection requirements
Data Specific numbers & facts for this task Vendor SLA: 94% vs 97% target, contract value SGD 1.2M
Situational Current circumstances & urgency Contract renewal in 30 days, 3 critical maintenance items overdue
Constraints Rules the output must follow All amounts in SGD, reference AnyCompany vendor policy, no clinical advice

Before & After: Vendor Assessment

❌ Before
Review this vendor and tell me what you think.
✓ After
You are a Senior Procurement Analyst at AnyCompany Healthcare with 10 years of experience in Singapore public healthcare vendor management.

Assess this medical equipment maintenance vendor:
- Vendor: MedTech Services Pte Ltd
- Contract value: SGD 1.2M/year
- SLA performance: 94% (target: 97%)
- Critical items overdue: 3
- Contract renewal: 30 days

Provide your assessment as:
1. RATING: GREEN / AMBER / RED
2. Performance summary table
3. Risk assessment (top 3 risks)
4. Recommended actions with owners

ONLY use data provided. Reference AnyCompany vendor SLA policy. All amounts in SGD.
💡 Key Insight

The "After" prompt uses all 4 pillars: Clarity (specific assessment task), Context (vendor data), Role (Senior Procurement Analyst), and Output Framing (GREEN/AMBER/RED + structured sections).

🧠 Chain-of-Thought Reasoning

Make the AI show its work. When agents reason step-by-step, they produce more accurate, auditable, and consistent results.

💭

Zero-Shot CoT

Simply add "Think step by step" or "Reason through this systematically." No examples needed — the agent activates its reasoning mode.

📝

Few-Shot CoT

Provide 1-2 worked examples showing the reasoning pattern you want. The agent mirrors your demonstrated thought process.

🔭

Step-Back Prompting

Ask the agent to first identify the general principle, then apply it to the specific case. "What policy applies here? Now apply it to this situation."

🔄

Self-Consistency

Ask the agent to approach the problem from multiple angles and check if conclusions align. Disagreements reveal uncertainty.

Zero-Shot CoT: Budget Approval

❌ Without CoT
Should we approve this SGD 85,000 equipment request from Department X?

Budget: SGD 2.4M annual
Spent YTD: SGD 1.8M
Committed: SGD 420K
✓ With CoT
Should we approve this SGD 85,000 equipment request from Department X?

Budget: SGD 2.4M annual
Spent YTD: SGD 1.8M
Committed: SGD 420K

Think through this step by step:
1. Calculate remaining available budget
2. Assess if request fits within available funds
3. Check against approval threshold policy
4. Evaluate clinical justification strength
5. Identify any conditions for approval
6. Provide final recommendation with reasoning
🧮 Why This Works

Without CoT, the agent might say "Yes, approve it" without checking if SGD 85K fits in the remaining budget (SGD 2.4M - SGD 1.8M - SGD 420K = SGD 180K available). With CoT, it calculates first, then reasons about thresholds and conditions.

Self-Consistency: Multiple Perspectives on Vendor Assessment

Approach Lens Conclusion Rating
Cost Analysis Is SGD 1.2M/year justified given 94% SLA? Overpaying by ~SGD 36K for underperformance AMBER
Quality Assessment 3 critical items overdue — patient safety impact? Unacceptable risk to equipment reliability RED
Risk Evaluation 30-day renewal window — alternatives available? Limited time to switch; negotiate with leverage AMBER
🔍 Consensus Check

Two approaches say AMBER, one says RED. The self-consistency technique reveals that while cost and timeline suggest caution, the quality/safety dimension is the most critical. Final recommendation: AMBER with escalation to RED if critical items not resolved within 7 days.

👤 Persona Engineering

The same data looks different through different eyes. Assign a persona to get domain-specific vocabulary, priorities, and judgment.

🧬 The Persona Formula

Combine these 5 elements for a powerful persona:

Title          → "Senior Procurement Analyst"
+ Experience   → "with 10 years in Singapore public healthcare"
+ Specialty    → "specialising in medical equipment vendors"
+ Characteristic → "Known for thorough, evidence-based assessments"
+ Behavior     → "You always cite specific data points and flag risks early"

Same Vendor Data, Different Eyes

📊 The Data

MedTech Services — SGD 1.2M contract, 94% SLA (target 97%), 3 critical items overdue, renewal in 30 days

👮 Compliance Officer
COMPLIANCE ASSESSMENT:

The 3% SLA shortfall constitutes a material breach under Clause 7.2 of the vendor agreement. The 3 overdue critical items represent a potential violation of our duty-of-care obligations under MOH equipment maintenance standards.

RECOMMENDATION: Issue formal Notice of Non-Compliance. Require written remediation plan within 14 days. Engage Legal for contract enforcement options.

RISK: If patient-facing equipment is affected, this may trigger mandatory MOH incident reporting.
⚙️ Operations Manager
OPERATIONAL IMPACT ASSESSMENT:

The 3 overdue critical items are my primary concern — which departments are affected? If these are in ICU or OT, we need immediate backup arrangements.

94% SLA means roughly 1 in 17 service calls is late or missed. For a hospital running 24/7, that's ~22 missed responses per year.

RECOMMENDATION: Convene vendor performance meeting this week. Get commitment on the 3 critical items within 48 hours. Start parallel evaluation of backup vendors — we can't afford a gap if renewal fails.

PRIORITY: Patient safety first, then cost negotiation.

Multi-Agent Framing: Policy Change Assessment

Scenario: Proposed change to visiting hours policy — extend from 2pm-8pm to 10am-8pm. Ask the agent to assess from 3 perspectives:

💰

Finance Manager

Concern: Additional 4 hours of visitor services = SGD 180K/year in staffing, utilities, and security. Need to identify budget source.

Verdict: DEFER until Q3 budget review

🏥

Clinical Operations

Concern: Morning hours (10am-12pm) overlap with ward rounds and procedures. Need visitor management protocol to avoid disruption.

Verdict: APPROVE with morning restrictions

📋

Compliance Officer

Concern: Extended hours increase infection control exposure. Must align with MOH visitor management guidelines and PDPA (visitor logs).

Verdict: APPROVE with enhanced screening

🎯 When to Use Multi-Agent Framing

Use this technique when a decision affects multiple stakeholders. In AgentSea, you can run the same data through different persona prompts to get a 360° view before making your recommendation.

📋 Structure & Grounding

Structure makes AI output actionable. Grounding makes it trustworthy. Together, they turn generic responses into production-ready deliverables.

Why Structure Matters

❌ Unstructured
The vendor seems to be underperforming. Their SLA is below target and there are some overdue items. We should probably talk to them about it and maybe consider other options. The contract is coming up for renewal soon so we need to decide what to do.
✓ Structured
## RATING: 🟡 AMBER

| Metric | Actual | Target | Gap |
|--------|--------|--------|-----|
| SLA Compliance | 94% | 97% | -3% |
| Critical Items | 3 overdue | 0 | +3 |
| Response Time | 4.2 hrs | 2 hrs | +2.2 hrs |

### RISKS
1. Patient safety — overdue items in Ward 5B
2. Contract leverage — 30 days to renewal
3. Regulatory — potential MOH reporting trigger

### ACTIONS
| Action | Owner | Deadline |
|--------|-------|----------|
| Issue performance notice | Procurement | This week |
| Escalate critical items | Operations | 48 hours |
| Identify backup vendors | Procurement | 14 days |

How to Prompt for Structured Output

Technique Prompt Phrase Best For
Rating System "Rate as GREEN / AMBER / RED with justification" Assessments, approvals, compliance checks
Tables "Present as a table with columns: [X], [Y], [Z]" Comparisons, metrics, action items
Numbered Lists "List the top 5 risks in priority order" Recommendations, risks, steps
Decision Format "State APPROVE / DEFER / REJECT then explain" Budget approvals, policy decisions

Markdown as Default Format

Format When to Use AgentSea Rendering
## Headings Section breaks in reports ✅ Rendered as bold headers
| Table | Data comparisons, metrics ✅ Rendered as formatted tables
- Bullet points Lists, action items ✅ Rendered as clean lists
**Bold** Key terms, ratings, emphasis ✅ Rendered as bold text
> Blockquote Policy citations, references ✅ Rendered as indented quotes

4 Grounding Rules for AgentSea

1️⃣

Only Use Provided Data

"ONLY use the data provided in this prompt. Do NOT use general knowledge or assumptions."

2️⃣

Cite Your Sources

"Reference specific policy clauses, document sections, or data points for every claim you make."

3️⃣

Flag Uncertainty

"If data is insufficient to make a determination, explicitly state what additional information is needed."

4️⃣

Constrain the Domain

"All amounts in SGD. Reference AnyCompany Healthcare policies. Singapore regulatory context only."

Before & After: Policy Q&A (Leave Carryover)

❌ Ungrounded
Q: Can I carry over my unused leave?

A: Yes, most companies allow you to carry over unused annual leave to the next year. Typically you can carry over up to 5-10 days. Check with your HR department for the specific policy.
✓ Grounded
Q: Can I carry over my unused leave?

A: Per AnyCompany Healthcare Leave Policy (Section 4.3):

- **Annual Leave:** Up to 5 days may be carried over to the following calendar year
- **Deadline:** Carryover must be utilised by 31 March
- **Approval:** Carryover exceeding 5 days requires HOD approval via Form HR-12
- **Medical Leave:** Cannot be carried over (Section 4.5)

⚠️ Note: This applies to permanent staff. Contract staff should refer to Section 6.2.

📎 Source: AnyCompany Healthcare Staff Handbook v3.1, Chapter 4
🔗 Grounding in AgentSea

When using the Document Analysis skill, upload the actual policy document. Then instruct: "Answer ONLY based on the uploaded document. Cite section numbers. If the answer is not in the document, say so."

🔧 Interactive Prompt Builder

Toggle techniques on and off to see how each one transforms the prompt and response quality. Watch the score bars change in real-time.

📝 Your Prompt
Loading...
🤖 AI Response
Loading...
Quality Score: Level 0 — Generic
Completeness
Data Grounding
Actionability
Consistency
💡 How Scoring Works

Each technique adds a bit value: Role=1, Context=2, Structure=4, Grounding=8, CoT=16. The combination determines which response level you see. Try toggling different combinations to find the sweet spot for your use case.

⚠️ Common Prompt Mistakes

Avoid these 7 pitfalls that turn powerful AI agents into unreliable assistants. Each mistake has a simple fix.

# Mistake Example Fix
1 Vague instructions "Look at this vendor proposal" "Assess SLA compliance and recommend GREEN/AMBER/RED rating"
2 No context provided "Is this budget request okay?" Include: amount, total budget, YTD spend, policy thresholds
3 Assuming AI remembers "Use the same format as last time" Each AgentSea session starts fresh — always specify format
4 No output format "Summarise this meeting" "Summarise as: Decisions (table), Action Items (with owners), Next Steps"
5 Trusting without grounding "What's our leave policy?" Upload the policy doc + "Answer ONLY from this document"
6 One mega-prompt 500-word prompt covering 10 different tasks Break into focused prompts: one task per interaction
7 No negative constraints "Help me with this patient query" Add: "Do NOT provide medical advice. Do NOT share PII."

3-Round Improvement Workflow

1️⃣

Round 1: Draft

Write your initial prompt with role + context + task. Run it and review the output. Ask: "What's missing? What's wrong?"

2️⃣

Round 2: Refine

Add structure (format requirements) and grounding (data constraints). Fix any hallucinations or vague sections from Round 1.

3️⃣

Round 3: Harden

Add negative constraints, edge case handling, and CoT reasoning. Test with different inputs. Save as your system prompt template.

Negative Constraints for Healthcare

🚫 Essential "Do NOT" Rules for Healthcare Admin Agents

These constraints protect your organisation from AI misuse:

Category Constraint Why
Clinical Do NOT provide medical advice or diagnoses AI is not a licensed practitioner — liability risk
Privacy Do NOT include patient names, NRIC, or identifiers in outputs PDPA compliance — personal data protection
Data Do NOT fabricate statistics or policy references Hallucinated data leads to wrong decisions
Scope Do NOT make final approval decisions — recommend only Human-in-the-loop for all consequential decisions
Authority Do NOT override established policies or procedures AI assists within existing governance frameworks

"AI Doesn't Remember Me" — Understanding AgentSea Sessions

❌ Misconception
"I told the agent my preferences last week. Why is it asking me again?"

"Use the same format as before."

"You already know our vendor policy — just apply it."
✓ Reality
Each AgentSea session starts with a blank slate.

The agent has NO memory of previous conversations.

✅ Solution: Use system prompts to "pre-load" your agent with:
- Your role and department context
- Standard output formats you prefer
- Policies and constraints that always apply
- Negative constraints (what it should never do)

This is why the Agent Design Canvas matters — it becomes your reusable system prompt that gives the agent "memory" of your preferences.
💡 Pro Tip: System Prompts = Persistent Memory

In AgentSea, your system prompt runs before every user message. Think of it as the agent's "training" — it reads this context every single time. That's why investing time in a good system prompt (via the Agent Design Canvas) pays off across hundreds of interactions.