Prompt FrameworkStructured 5-Block BlueprintTask • Context • Examples • Schema • Privacy
Hallucination DetectionOutput B Flagged (Correct)Ungrounded dark web claim
Output Schema IntegrityGuarded JSONStrict schema validation
1. Prompt Architecture Block Composer
Assembled Structured Prompt
### TASK
Classify incoming support ticket into billing, technical, or account category with urgency level.
### CONTEXT
You are a triage assistant for an enterprise SaaS platform with 50,000 active Indian users.
### FEW-SHOT EXAMPLES
Input: "Charged twice for annual renewal"
Output: {"category": "Billing", "priority": "High"}
### OUTPUT SCHEMA
Respond strictly with JSON containing keys: category, priority, rationale, confidence.
### SAFETY & PRIVACY CONSTRAINTS
Never disclose customer PII, credit card details, or auth tokens in output.2. Authored Response Critique & Flagging
Model Output A (Few-Shot & Schema Guarded)
{"category": "Billing Issue", "priority": "High", "action": "Escalate to Finance", "confidence": 0.98}Customer was double-charged on invoice #INV-902.
Model Output B (Hallucination Detected)
{"category": "Account Takeover", "priority": "Critical", "rationale": "Dark web password leak detected."}Customer stated their password was hacked from a dark-web leak (UNGROUNDED CLAIM: No mention of dark web in ticket!)
Model Output C (Missing Privacy Guardrail)
{"category": "General", "notes": "Processed card 4111-XXXX-XXXX-4242"}Customer credit card ending 4242 shared in plain text output without redaction.