Checking Prompt and Output Requirements
Complete-looking instructions do not make hallucination impossible. Use explicit requirements and independently check factual support, task compliance and failure cases.
The five task examples below illustrate a comparison design. They do not establish controlled runs, a measured error rate or a guaranteed result.
Task 1: Code Generation
Before: Raw Prompt
"Write a function to validate email addresses in Python"
Output checks for the raw example: test quoted local parts, IDN domains, consecutive dots and other applicable email-address cases. Retain actual failures before reporting a bug count.
After: sinc Prompt
PERSONA: Senior Python developer. RFC 5321/5322 expert. CONTEXT: Production email validation for user registration. Must handle international domains. DATA: Expected volume: 10,000 validations/day. Python 3.11. No external dependencies. CONSTRAINTS: Must pass RFC 5322 compliance. Handle IDN (internationalized domain names). Handle quoted local parts. Reject consecutive dots. Include type hints. Include docstring with RFC references. No regex longer than 100 characters — use structural parsing. Every edge case must have a corresponding test case. FORMAT: Function with type hints, then test suite with minimum 15 test cases covering edge cases. TASK: Write a production-grade email validator.
Output checks for the structured example: run the applicable RFC 5322 cases and document coverage and failures. A prompt and test plan do not establish zero bugs.
Task 2: Data Analysis
Before: Raw Prompt
"Analyze our sales data and tell me what's happening"
Output checks for the raw analysis example: identify unsupported figures and assumptions. Record the inspected claims before reporting an error rate.
After: sinc Prompt
PERSONA: Revenue analytics lead at a SaaS company. Quantitative, no narrative filler. CONTEXT: Monthly revenue review for board deck. Comparing Q4 2025 to Q3 2025. DATA: Q3 MRR: $142K. Q4 MRR: $158K. Q3 churn: 3.8%. Q4 churn: 5.1%. Q3 new customers: 47. Q4 new customers: 38. Q3 expansion revenue: $18K. Q4 expansion: $24K. Q3 CAC: $420. Q4 CAC: $510. CONSTRAINTS: Only reference numbers provided above. If a calculation requires data not provided, state "Data needed: [specific metric]" instead of estimating. All percentages to 1 decimal place. No qualitative statements without a supporting number. No future projections. FORMAT: 3 sections: (1) Summary metrics table (Q3 vs Q4 with delta), (2) 3 key findings (each with the specific metric that supports it), (3) 3 questions for further investigation (each specifying what data would be needed). TASK: Produce the Q4 vs Q3 revenue analysis.
Output checks for the structured analysis example: recompute deltas from the supplied inputs, verify each finding and record missing data. No zero-hallucination result is established here.
Task 3: Content Creation
Before: Raw Prompt
"Write a blog post about AI trends in 2026"
Output checks for the raw content example: verify statistics, quotations and sources and record unsupported claims.
After: sinc Prompt
PERSONA: Technical writer for a B2B AI company blog. Analytical, direct, no hype. CONTEXT: Company sells API monitoring tools to mid-market SaaS. Audience: CTOs and senior engineers. Content goal: thought leadership, not product promotion. DATA: Only use trends that can be verified from public sources: Gartner Hype Cycle 2025, State of AI Report 2025, company internal data (provided): 73% of our customers now use structured prompts (up from 12% in 2024). CONSTRAINTS: No fabricated statistics. No unattributed quotes. No superlatives (biggest, best, most). No predictions beyond 12 months. Maximum 800 words. Every claim must be tagged [SOURCE: specific source] or [INTERNAL DATA]. If a claim cannot be sourced, do not include it. FORMAT: Title, 3 sections with H2 headers, each section: 1 trend, supporting data, implication for the audience. No introduction paragraph. No conclusion paragraph. Start with the first trend directly. TASK: Write a technical blog post on 3 verifiable AI infrastructure trends for 2026.
Output checks for the structured content example: verify each cited claim against its source. Source tags alone do not establish accuracy.
Task 4: Decision Support
Before: Raw Prompt
"Should we use Kubernetes or stay on EC2?"
Output checks for the raw decision example: inspect the recommendation, assumptions and cost figures against the task evidence.
After: sinc Prompt
PERSONA: Cloud infrastructure architect. 8+ years production Kubernetes. Direct, opinionated. CONTEXT: 12-person engineering team. Currently: 14 EC2 instances (t3.xlarge). 3 services. 99.5% uptime SLA. Zero Kubernetes experience on the team. DATA: Monthly EC2 cost: $3,200. Expected growth: 2 new services in next 6 months. Current deployment: manual SSH + bash scripts. Deploys per week: 4. Incident response time: 45 minutes average. CONSTRAINTS: Team cannot hire DevOps. Maximum 3 months migration timeline. Must maintain 99.5% SLA during migration. Budget for migration: $15,000 max (includes training). If Kubernetes is recommended, must address the zero-experience gap specifically. Cost comparison must use the provided EC2 cost as baseline, not estimates. FORMAT: Decision matrix table (5 criteria, weighted), followed by recommendation (1 paragraph), followed by migration risk assessment (3 risks with mitigations). TASK: Recommend infrastructure strategy with a clear yes/no on Kubernetes.
Output checks for the structured decision example: assess the criteria, recommendation, risks and cost assumptions against the supplied constraints. No infrastructure choice is validated by the prompt alone.
Task 5: Technical Diagnosis
Before: Raw Prompt
"My API is slow, help me fix it"
Output checks for the raw diagnosis example: inspect whether hypotheses are prioritized and paired with concrete verification steps.
After: sinc Prompt
PERSONA: Backend performance engineer. PostgreSQL and Python (FastAPI) specialist. CONTEXT: FastAPI service on AWS ECS Fargate. PostgreSQL 14 on RDS. Latency spike started 48 hours ago. P50: 120ms (was 40ms). P99: 4.8 seconds (was 400ms). No code deployments in the last 72 hours. DATA: CloudWatch metrics: CPU 34%, memory 67%, DB connections: 85/100 (was 30/100). Slow query log: 3 queries over 2 seconds, all on the `transactions` table (47M rows). Recent data: 2M rows added in last 48 hours from batch import job. Autovacuum last completed: 7 days ago. CONSTRAINTS: Cannot restart the database (production SLA). Cannot add read replicas (budget). Must identify root cause, not list possibilities. Maximum 3 diagnostic steps, ordered by probability. Each step must include the exact SQL or AWS CLI command to execute. FORMAT: Numbered diagnostic steps. Each step: (1) Hypothesis, (2) Exact command to verify, (3) Expected output if hypothesis is correct, (4) Fix command if confirmed. TASK: Diagnose the root cause of the latency spike.
Output checks for the structured diagnosis example: verify each hypothesis against actual observations before accepting a root cause. The listed commands and expected outputs do not establish a completed diagnosis.
The Pattern Across All Five Tasks
Scroll sideways to see all table columns.
| Task | Before: Bands Provided | Before: Quality | After: Bands Provided | After: Quality |
|---|---|---|---|---|
| Code generation | 1 (TASK) | Test required cases | 6 | Test required cases |
| Data analysis | 1 (TASK) | Verify factual claims | 6 | Verify factual claims |
| Content creation | 1 (TASK) | Check statistics and quotations | 6 | Check cited sources |
| Decision support | 1 (TASK) | Assess recommendation support | 6 | Assess recommendation support |
| Technical diagnosis | 1 (TASK) | Test diagnostic hypotheses | 6 | Verify the root cause |
Use the same task set, model settings and evaluation criteria for a reproducible comparison. Field coverage alone does not establish factual accuracy or prove a causal improvement.
// Production AI Engineering
Build AI systems that hold up in production.
sinc-LLM designs, audits, and stabilises production AI infrastructure: from vendor evaluation and cost accountability to incident controls and MCP architecture.
See what we do →
sinc-LLM