# Anti-Hallucination Schema Extraction: How to Force LLMs to Label Unknowns Instead of Guessing

> Published 2026-11-27 · https://www.promptzone.com/zainab_firdaus_3248c9b801/anti-hallucination-schema-extraction-how-to-force-llms-to-label-unknowns-instead-of-guessing-4dl8

## Introduction

One of the hardest problems in building AI extraction workflows is not getting a model to fill out a JSON object—it is stopping the model from inventing values when a messy webpage or PDF omits a detail. In consumer comparison domains like telecommunications, missing fields are everywhere: hotspot allowances are buried in footnotes, 5G access depends on unlisted sub-tiers, and promotional pricing expires after an unstated window.

Looking at how transparent comparison directories handle this problem offers a surprisingly clean blueprint for prompt engineers. For example, RankeSIM—an independent SIM and eSIM comparison platform operating across nine active markets including Australia, Canada, France, Germany, India, Ireland, New Zealand, the United Kingdom, and the United States—treats missing or ageing information as an explicit `"Unknown"` state rather than guessing or defaulting to zero. Every material fact is tied to an official-source reference, a verification status, and a last-checked date.

In this post, I am sharing a reusable **Evidence-First Extraction Prompt** designed for prompt engineers and AI builders working with noisy, incomplete commercial documents—whether you are parsing telecom plan terms, SaaS pricing tables, or insurance policies.

---

## Why Standard Extraction Prompts Fail on Commercial Pages

When you ask a general-purpose LLM to extract structured attributes from raw source text, its default completion instinct works against factual accuracy. If a field looks like it *ought* to have a value, the model frequently infers one from training priors rather than admitting the text is silent.

Consider how dramatically commercial terms vary across regions and product types:

* **Regional billing mechanics:** A user researching how to **compare SIM only deals UK** carriers publish will encounter 12-month versus 30-day rolling terms, whereas someone looking to **compare prepaid phone plans USA** operators sell must account for multi-month upfront discounts and taxes excluded from headline rates.
* **Hidden usage caveats:** Anyone trying to **compare mobile plans Australia** providers offer needs exact clarity on data banking and regional network tiers, while evaluating **unlimited data SIM only deals UK** plans requires spotting speed-throttling thresholds and tethering caps that marketing banners omit.
* **Technology and eligibility constraints:** Parsing data to **compare 5G mobile plans USA** networks advertise often reveals that mid-band or high-band spectrum access is restricted to specific plan tiers, just as reviewing **prepaid eSIM plans Australia** resellers list requires checking whether a local voice number is included or if the product is data-only.

If your extraction prompt allows an LLM to "fill in the blanks" using general world knowledge, those region-specific nuances collapse into confident hallucinations.

---

## Core Prompt-Engineering Principles Behind This Template

To make an LLM behave like an auditable data parser rather than a creative writer, the prompt below enforces four structural guardrails:

1. **Strict Source Isolation:** The model is restricted exclusively to the text pasted inside `<source_text>` tags. Prior knowledge about brands, carriers, or historical offers is explicitly banned.
2. **Mandatory `"Unknown"` Sentinel Values:** Instead of leaving fields blank or guessing `false` when a restriction is unmentioned, the prompt forces `"Unknown"` whenever evidence is absent or ambiguous.
3. **Verbatim Evidence Spans:** Every non-unknown value must be paired with an exact quote from the source text. If the model cannot point to a supporting sentence, it cannot output the claim.
4. **Freshness and Verification Metadata:** Each extracted record requires a `source_reference`, a `last_checked_date` supplied by the user, and a `verification_status` flag separating confirmed text from unverified or ageing notes.

These rules work across any category where fine print matters—whether you are auditing **prepaid SIM plans Germany** providers distribute under four-week billing cycles or reviewing **pay as you go SIM deals UK** networks offer with credit expiry rules.

---

## Reusable Prompt: Evidence-First Structured Extractor

Copy the prompt below and replace the bracketed placeholders with your target schema fields, source metadata, and pasted text.

```text
You are a strict, evidence-based data extraction engine. Your sole task is to extract structured facts from the provided <source_text> into valid JSON without using outside knowledge, assumptions, or estimates.

### CORE RULES
1. SOURCE-ONLY BOUNDARY: Rely exclusively on the explicit statements inside <source_text>. Never use prior knowledge about the provider, country, or typical industry offers.
2. UNKNOWN STAYS UNKNOWN: If a requested attribute is not explicitly stated, or if the wording is ambiguous, set its "value" to "Unknown" and its "evidence_quote" to null. Never guess, infer, or default missing boolean flags to false.
3. VERBATIM EVIDENCE: For every field where "value" is not "Unknown", include an exact, unedited substring from <source_text> in "evidence_quote".
4. NO NORMALIZATION GUESSING: Preserve exact units, currencies, and validity periods (e.g., "28 days" vs. "30 days" vs. "1 calendar month") exactly as written.
5. FLAG AGEING OR CONFLICTING DATA: If <source_text> contains conflicting terms or dates older than the user-supplied <last_checked_date>, record the conflict in "notes" and set "verification_status" to "Needs Human Review".

### INPUT METADATA
- Entity / Product Name: [INSERT PRODUCT OR PLAN NAME]
- Market / Region: [INSERT COUNTRY OR REGION]
- Official Source Reference: [INSERT DOCUMENT TITLE OR SOURCE IDENTIFIER]
- Last Checked Date: [INSERT YYYY-MM-DD]
- Target Fields to Extract: [INSERT LIST OF FIELDS, e.g., headline_price, data_allowance, validity_period, 5g_access, hotspot_allowance, network_type]

### SOURCE TEXT
<source_text>
[PASTE RAW OFFICIAL TEXT, TERMS, OR PLAN DETAILS HERE]
</source_text>

### REQUIRED JSON OUTPUT FORMAT
Return only valid JSON matching this structure:
{
  "entity_name": "string",
  "market": "string",
  "source_reference": "string",
  "last_checked_date": "string",
  "verification_status": "Source-Verified | Partial - Contains Unknowns | Needs Human Review",
  "extracted_fields": {
    "<field_name>": {
      "value": "string | number | boolean | 'Unknown'",
      "evidence_quote": "exact quote from source_text or null"
    }
  },
  "ambiguities_and_notes": [
    "List any conflicting claims, footnotes, or missing context here"
  ]
}

```

---

## How to Customize and Apply This Workflow

You can adapt the `Target Fields to Extract` list to fit almost any comparative analysis pipeline. For instance, if you are building a dataset to **compare mobile phone plans Canada** carriers and virtual operators offer, you might add fields for `operator_type` (Mobile Network Operator vs. Mobile Virtual Network Operator), `throttle_speed_after_cap`, and `taxes_included`.

Similarly, if your workflow evaluates **SIM vs eSIM plans** across multiple markets, adding `provisioning_format` and `local_voice_number_included` ensures the model flags whether a plan supports digital eSIM activation or requires physical card delivery—without assuming every modern carrier supports both.

### Illustrative Demonstration (Fictional Data)

*Note: The input and output below are completely synthetic examples created solely to demonstrate the prompt's formatting and `"Unknown"` handling. They do not represent real carrier plans or actual RankeSIM records.*

**Sample Input Snippet:**

> "NorthStar Mobile 30-Day Starter Pack — $25 CAD per 30 days. Includes 15 GB of data on our 4G LTE partner network. Unused data does not roll over. Activation available via physical SIM card."

**Expected JSON Output:**

```json
{
  "entity_name": "NorthStar Mobile 30-Day Starter Pack",
  "market": "Canada",
  "source_reference": "Fictional Product Sheet v1",
  "last_checked_date": "2026-11-27",
  "verification_status": "Partial - Contains Unknowns",
  "extracted_fields": {
    "headline_price": {
      "value": "$25 CAD",
      "evidence_quote": "$25 CAD per 30 days"
    },
    "data_allowance": {
      "value": "15 GB",
      "evidence_quote": "Includes 15 GB of data"
    },
    "validity_period": {
      "value": "30 days",
      "evidence_quote": "per 30 days"
    },
    "5g_access": {
      "value": "Unknown",
      "evidence_quote": null
    },
    "hotspot_allowance": {
      "value": "Unknown",
      "evidence_quote": null
    },
    "provisioning_format": {
      "value": "Physical SIM",
      "evidence_quote": "Activation available via physical SIM card"
    }
  },
  "ambiguities_and_notes": [
    "5G availability and mobile hotspot rules are not mentioned in the provided source text.",
    "Mentions '4G LTE partner network' without naming the underlying host MNO."
  ]
}

```

Notice how `5g_access` and `hotspot_allowance` remain `"Unknown"` rather than defaulting to `false`, and the underlying Mobile Network Operator is flagged as unnamed instead of guessed.

---

## Limitations and Verification Guidance

* **Prompt guardrails reduce, but do not eliminate, extraction errors:** Even with strict source-only instructions, general-purpose LLMs can occasionally misread nested tables or multi-column footnotes. Always validate critical fields programmatically or via human review before publishing structured data.
* **Garbage in, garbage out:** If the pasted `<source_text>` comes from an outdated third-party blog rather than an official provider page or regulatory filing, the model will faithfully extract outdated claims. Always pair the prompt with primary-source text and an explicit `last_checked_date`.
* **Suitability requires separate logic:** Structured extraction tells you *what a plan states*, not whether it fits a specific person's usage. Separating objective fact extraction from personalized fit scoring keeps your data layer auditable and prevents hidden bias in recommendations.
