Back to Learning Center
Learning Center

Prompt Troubleshooting: Fixing Inconsistent AI Outputs

Common prompt issues and fixes: inconsistent extraction, tone drift, hallucinations.

Prompt Troubleshooting: Fixing Inconsistent AI Outputs

AI outputs fail in predictable ways. The model skips fields you need. It switches from bullets to paragraphs mid-conversation. It invents case citations that don't exist. These failures cost time and erode trust in automation.

This guide shows you how to diagnose and fix the three most common prompt failures: inconsistent extraction, tone drift, and hallucinations. Each section includes the exact prompt modifications that solve the problem.

Inconsistent Extraction

Extraction fails when the model returns incomplete data, changes output structure between runs, or loses context mid-task. Here's how to fix each failure mode.

Problem 1: Missing Required Fields

You ask for client name, matter number, billing rate, and hours worked. The model returns three of four fields. Next run, it returns different three fields.

Root cause: The model treats your request as a suggestion, not a requirement.

Fix with structured output enforcement:

Extract the following fields from each timekeeper entry. Return ONLY valid JSON. If a field is missing from the source, use null.

Required fields:
- timekeeper_name (string)
- matter_number (string, format: YYYY-NNNN)
- billing_rate (number, USD per hour)
- hours_worked (number, decimal to 2 places)

Source text: [PASTE ENTRY HERE]

Output format:
{
  "timekeeper_name": "value",
  "matter_number": "value",
  "billing_rate": 000.00,
  "hours_worked": 0.00
}

Why this works: Explicit format requirements, null handling for missing data, and example structure eliminate ambiguity.

Problem 2: Format Switching Between Responses

First response uses bullet points. Second uses numbered lists. Third uses paragraphs. You can't parse the output programmatically.

Root cause: No format specification in the prompt.

Fix with format locking:

Summarize the following contract terms. Use EXACTLY this format for every response:

## Key Terms
- [Term 1]
- [Term 2]
- [Term 3]

## Financial Terms
- Payment schedule: [details]
- Total value: [amount]

## Risk Factors
- [Risk 1]
- [Risk 2]

Do not deviate from this structure. If a section has no relevant information, write "None identified."

Why this works: Template structure with section headers and explicit "do not deviate" instruction. The fallback text ("None identified") prevents the model from skipping sections.

Problem 3: Context Loss in Multi-Turn Conversations

The model starts strong but forgets key constraints by turn three. You specified "only include billable hours" but it starts including non-billable time.

Root cause: Context window limitations and no constraint reinforcement.

Fix with constraint anchoring:

STANDING INSTRUCTIONS (apply to all responses in this conversation):
- Include ONLY billable hours
- Exclude administrative time, business development, and pro bono
- Flag any ambiguous entries with [REVIEW NEEDED]

Current task: [YOUR SPECIFIC REQUEST]

Confirm you understand the standing instructions before proceeding.

Why this works: Labeled standing instructions that persist across turns. Confirmation step ensures the model acknowledges constraints before starting work.

Tone Drift

Tone drift happens when the model shifts from professional to casual, formal to conversational, or technical to simplified language mid-response. This undermines credibility in client-facing documents.

Problem 4: Inappropriate Casualness

You need a formal client memo. The model writes "The contract is pretty solid, but there are a few things to watch out for."

Root cause: No tone specification or conflicting tone signals in your prompt.

Fix with tone anchoring:

Write a client memorandum analyzing the attached contract. Use the tone and style of a senior associate at a large law firm.

Tone requirements:
- Formal, precise legal language
- No contractions (use "do not" not "don't")
- No hedging language ("pretty", "kind of", "somewhat")
- Direct statements of risk and recommendation

Begin with "MEMORANDUM" header. Use section headers for Background, Analysis, and Recommendation.

Why this works: Specific role model (senior associate), explicit forbidden words, and structural requirements that reinforce formality.

Problem 5: Overly Stiff or Robotic Language

The model produces technically correct but unreadable text: "It is hereby noted that the aforementioned party of the first part has failed to execute the requisite documentation."

Root cause: Overcorrection from "be formal" instructions.

Fix with balanced tone specification:

Rewrite this contract summary for a partner review meeting. Use professional but conversational language.

Style guide:
- Write as you would speak to a senior colleague
- Use active voice ("The client must sign" not "Signature is required")
- Avoid legalese ("party of the first part" → "the buyer")
- Keep sentences under 25 words

Test: Read your output aloud. If it sounds like a robot, rewrite it.

Why this works: Concrete style rules with examples. The "read aloud" test gives the model a self-check mechanism.

Hallucinations

Hallucinations are invented facts, fake citations, or fabricated recommendations. They're the most dangerous output failure because they look plausible.

Problem 6: Fake Case Citations

The model cites "Johnson v. Smith, 847 F.3d 392 (7th Cir. 2019)" in a legal memo. The case doesn't exist.

Root cause: The model generates plausible-looking citations from pattern matching, not memory.

Fix with citation constraints:

Draft a legal memorandum on [TOPIC]. 

CITATION RULES (MANDATORY):
- Do NOT cite any cases, statutes, or regulations
- Instead, use bracketed placeholders: [RELEVANT CASE ON POINT]
- Mark each placeholder with the legal principle it should support
- I will fill in real citations during review

Example: "Courts have held that [CASE: DUTY TO MITIGATE DAMAGES] requires the plaintiff to take reasonable steps to reduce losses."

Why this works: Eliminates the hallucination vector entirely. Placeholder system preserves document structure while preventing fake citations.

Problem 7: Invented Statistics or Data

The model claims "73% of law firms have adopted AI for contract review" when no such statistic exists.

Root cause: The model confabulates numbers that sound plausible.

Fix with data sourcing requirements:

Write an article on AI adoption in law firms.

DATA RULES:
- Do NOT include any statistics, percentages, or numerical claims
- If you want to reference a trend, use qualitative language: "Many firms report..." or "Industry observers note..."
- Mark any claim that would benefit from data with [CITATION NEEDED]

I will add verified statistics during the editing phase.

Why this works: Removes the model's ability to invent numbers. Qualitative language preserves the narrative flow without false precision.

Problem 8: Fabricated Recommendations

The model suggests "Implement a four-tier approval process" when you never mentioned approval tiers in your source material.

Root cause: The model generates recommendations from general knowledge, not your specific context.

Fix with source-grounding:

Review the attached policy document and suggest improvements.

CONSTRAINT: Base ALL recommendations on gaps or issues you identify in the source document. 

Format each recommendation as:
- Issue identified: [quote from source or describe gap]
- Recommendation: [your suggestion]
- Rationale: [why this addresses the issue]

Do not suggest improvements based on general best practices unless you can tie them to a specific gap in the source material.

Why this works: Forces the model to ground every recommendation in observable evidence from your source material.

Quick Reference: Diagnostic Checklist

When AI output fails, run through this checklist:

Extraction failures:

  1. Did I specify required fields explicitly?
  2. Did I provide an output format example?
  3. Did I include null-handling instructions?

Tone failures:

  1. Did I specify the target audience and context?
  2. Did I provide forbidden words or phrases?
  3. Did I give a concrete role model (senior associate, partner, etc.)?

Hallucination failures:

  1. Did I prohibit citations or statistics the model can't verify?
  2. Did I require source-grounding for all claims?
  3. Did I provide placeholder formats for information I'll add later?

Most prompt failures trace back to underspecified requirements. The model isn't malfunctioning - it's filling gaps with its best guess. Your job is to eliminate the gaps.

Revenue Institute

Reviewed by Revenue Institute

This guide is actively maintained and reviewed by the implementation experts at Revenue Institute. As the creators of The AI Workforce Playbook, we test and deploy these exact frameworks for professional services firms scaling without new headcount.

Revenue Institute

Need help turning this guide into reality? Revenue Institute builds and implements the AI workforce for professional services firms.

RevenueInstitute.com