Apply to my task
arXiv:2608.19025 ★ 81 Aug 19, 2026

Self-Prompting + Cross-Model Consensus: How to Make LLMs Reliably Extract Complex Data from Text

Key result

Same model, same prompt, same article — accuracy swings from 95% to 78% just from a restart. The method lets you get reliable data out of scientific texts and reports, even when the model itself is inconsistent from run to run. The trick: don't try to perfect the prompt — multiply the runs and take whatever repeats most often — 5 runs plus majority voting wipes out random noise, and cross-checking answers across different models (GPT, Claude, Gemini) catches systematic errors.

TL;DR

This method combines three tricks: the LLM writes its own working prompt (after studying prompting best practices and domain terminology), several prompt drafts get merged into one "master prompt," and then extraction runs five times in a row — with the answer that shows up most often winning. On top of that, results from several different models (GPT, Claude, Gemini, etc.) get cross-checked — wherever the models disagree, that's your signal: this case is contested, a human needs to step in.

The core pain point: LLMs are inconsistent. The same prompt on the same paper can produce a correct answer in three out of five runs and a wrong one in the other two. In the study, only 76% of extracted values matched across all five consecutive runs, and for some models accuracy swung from 95% in one run to 78% in another. Interestingly, models find raw numbers correctly almost every time (99%), but figuring out which exact condition a number belongs to (which sample, which temperature, which measurement method) turns out noticeably harder (81%).

The method fixes this not with a smarter prompt, but through repetition and cross-checking: five runs of the same prompt plus majority voting cancels out random noise, while comparing multiple models catches systematic errors — including mistakes in the source data that humans themselves missed.


Method Blueprint

STEP 1 (separate model request): Ask the LLM to study prompting best practices for itself + terminology for your topic → draft prompt
STEP 2: Repeat step 1 two more times (same model or different ones, your call) → 3 drafts
STEP 3 (separate request): Give the model all 3 drafts → "merge the best parts of these into one master prompt"
STEP 4: Run the master prompt on your document 5 times (5 separate chats/runs) → take the answer that matched in at least 3 out of 5 runs
STEP 5 (optional, for important decisions): Run the same master prompt in 2-3 different LLMs → if answers disagree, that's a contested case — check it yourself

Example in Action

Task: A venture fund analyst is going through 15 competitor press releases and annual reports to pull data into a table: revenue, margin, number of active customers, and reporting currency/period. Same problem as in the study: the LLM easily finds the raw numbers, but tying them to the right period and currency (say, euros vs. dollars, quarter vs. year) is trickier.

Prompt (steps 1-3, self-authoring):

Study best practices for writing prompts that extract financial data from reports.
Study standard financial reporting terminology (EBITDA, margin, ARR, reporting period).
Based on this, write a prompt that extracts from a financial document:
revenue, margin, number of customers, currency, and reporting period,
with a mandatory quote from the source text for each extracted value.
Output format: a table.

Repeat this 3 times (new chats are fine), then:

Here are three prompts for extracting financial data: [insert 3 drafts].
Merge the best elements of each into one final prompt.

Result: You end up with a ready-made master prompt tuned for financial reports. Run it 5 times on each report (ideally in fresh chats, to avoid context bleed), compile into a table, and take the value that matched at least 3 times. Wherever answers disagreed across all five runs — that's your signal that the document is ambiguous and needs a manual look.


Why This Works

LLMs are inconsistent across runs — the same model can give different answers to the same question, especially when the task requires more than just finding a number: it needs to understand context (which condition that number belongs to). This isn't a bug, it's just how text generation works: the model assembles its answer slightly differently each time.

But LLMs are great at mechanical search and pattern matching — they find numbers with near-perfect accuracy. Majority voting across five runs cancels out random noise: if an error is random, it won't repeat 3+ times, but if it's systematic (say, the model keeps confusing two tables), it'll repeat consistently — and that's useful information too.

Levers you can adjust: - Number of runs (5→3) — dial it down for simple tasks, up for high-stakes decisions. - Number of models for cross-checking — more models means more chances to catch an error, but costs more time. - Requiring a quote next to each extracted value — forces the model to show its sources, making verification easier. - The "contested case" threshold — you can swap majority voting for "any disagreement = human review" for a more conservative approach.


Prompt Template

STAGE 1 — self-authoring the prompt:
Study prompting best practices for the task "{task_type}".
Study domain-specific terminology in the field "{domain}".
Write a prompt to extract the following data from a document: {field_list}.
For each extracted value, provide a quote from the text it was taken from.
Output format: a table with columns {field_list}.

(repeat 3 times, then:)

STAGE 2 — merging:
Here are three prompt variants: {prompt_1}, {prompt_2}, {prompt_3}.
Merge the best elements of each into one final prompt.

STAGE 3 — extraction (repeat 5 times on the same document):
{final_prompt}
Document: {text_or_file}

STAGE 4 — aggregation:
Here are 5 extraction results for one document: {result_1...5}.
For each field, report the value that matched in at least 3 out of 5 cases.
If fewer than 3 matches — flag it as "contested, needs human review."

🚀 Quick Start — paste into chat:

Here's a template for the self-prompting and majority-voting method for data extraction.
Adapt it to my task: {your task}.
Ask me questions to fill in the fields.

[insert template above]

The LLM will ask what data fields you actually need and from which documents — because without that, it can't build a working extraction prompt. It'll take the template's structure and fill it in with the specifics of your task.


Limitations

⚠️ Contextual classification is weaker than numeric extraction: the model almost always finds the number itself correctly, but makes noticeably more mistakes figuring out which condition (sample, method, period) that number belongs to. Don't trust context classification without checking it.

⚠️ Self-written prompts underperform expert-written ones: even the best model, when writing its own prompt, lost a few percentage points of accuracy compared to a prompt written by a human expert. Self-prompting gets you to "pretty good," not "just as good."

⚠️ Autonomous source-finding isn't reliable: if you ask the model to find the relevant papers/documents itself (rather than just processing the ones you give it), it'll either miss most of the relevant sources or start inventing citations that don't exist. It's better to hand it the documents to analyze yourself.

⚠️ More output doesn't mean better output: some models produce a lot of "extra" data rows that don't directly answer the question. This creates an illusion of thoroughness but adds manual filtering work.

⚠️ The method takes time: five runs per document plus the self-prompting stages add up to a series of steps, not a single request. For quick one-off tasks, this is overkill.


How It Was Studied

The team took 18 real scientific papers from the 1980s-2000s on calcium binding to the protein troponin — a complex topic with outdated terminology, data scattered across tables and text, and even scanned images instead of text. Seven top models (GPT, Claude Opus, Gemini, Qwen, Kimi, GLM, DeepSeek) were tested through the regular browser interface — meaning the way most people actually use them, not via API.

Each of four scenarios (expert prompt → self-written prompt → autonomous source-finding → building a new dataset in a different field) was run five times, and the results were compared against a reference dataset assembled by humans. A telling detail: the human experts themselves didn't always agree with each other — their assessments matched in only 79% of cases, which shows that even "ground truth" in complex scientific tasks can be partly subjective.

The biggest surprise: accuracy for the same model could swing by nearly 17 percentage points between runs, and that's exactly what justifies majority voting across five runs as a practical standard — not overkill.


Resources

Romanov V., Bax M., Niederer S. "Self-prompting and cross-model consensus enable reproducible data extraction from scientific literature with large language models". Imperial College London, University of Cambridge, Stanford University.

Research digest

Key result

Same model, same prompt, same article — accuracy swings from 95% to 78% just from a restart. The method lets you get reliable data out of scientific texts and reports, even when the model itself is inconsistent from run to run. The trick: don't try to perfect the prompt — multiply the runs and take whatever repeats most often — 5 runs plus majority voting wipes out random noise, and cross-checking answers across different models (GPT, Claude, Gemini) catches systematic errors.

Principle

Don't try to nail the perfect prompt on the first try — have the model study prompting best practices and topic-specific terminology itself, write 3 drafts, then merge them into a master prompt. From there, don't trust a single answer: run the master prompt 5 times and take the value that matches in at least 3 out of 5. If it matches 3+ times, you can trust it; if it disagrees everywhere, that's your signal for human review.

Why it works

The model finds numbers almost perfectly — 99% accuracy. But figuring out which sample, condition, or period that number belongs to — that drops to 81%, and this is where the model starts to get confused. A random error won't repeat across 3 consecutive runs, but a systematic one will repeat every time — and that's useful information too. Majority voting doesn't make the model smarter; it just filters signal from noise.

When to apply

Extracting structured data from documents → scientific papers, financial reports, press releases — especially when it matters not just to find a number, but to correctly tie it to a condition (sample, period, currency, measurement method). NOT suited for quick one-off tasks — the method requires 5+ runs and several prompt-prep stages; it's not a 10-second Q&A.

Mini recipe

1. Have the model write its own prompt: ask it to study prompting best practices plus your topic's terminology, repeat 3 times — you get 3 drafts. 2. Merge the drafts into one: give the model all 3 versions and ask it to combine the best parts into a master prompt. 3. Run it 5 times: run the master prompt on the document in 5 separate chats (not one — to avoid context contamination). 4. Vote by majority: for each field, take the value that matches in at least 3 out of 5 runs. 5. For high-stakes decisions, cross-check models: run the same prompt on 2-3 different LLMs. Disagreement = a contested case — check it yourself.

Examples

[BAD]: `Extract revenue, margin, and customer count from this report` — one query, one run, trusting the first answer. [GOOD]: `Study the best practices for extracting financial data. Write a prompt for revenue, margin, customer count, currency, and period, with a quote from the text for each value` — repeat 3 times, merge into a master prompt, run it 5 times on the report, take the value that matched at least 3 times. Wherever it disagreed everywhere — check the report by hand.

In plain words

Large language models constantly screw up complex data extraction — not because they're dumb, but because generation is inherently random. A model easily spots a number but mixes up the context: pins revenue to the wrong quarter or gets the currency wrong. The real problem here is zero reproducibility: one run comes out clean, and the next turns into a hallucination circus, where the data gets pulled out of thin air.

It's like sitting five interns down in front of a murky financial report and asking each one to pull out the margin. If 4 out of 5 come back with the same number, you can confidently run with it. But if the answers scatter, there's no way around it: manual review kicks in, because the helpers clearly got tripped up by some tricky wording.

To avoid the headache, people use a three-step combo. First, the model writes its own precise instructions via self-prompting, after studying the domain's terminology, and merges the drafts into a single master prompt. Next, you run it 5 times in a row and take the result by simple majority vote. The final filter is cross-model consensus: you run the task through different LLMs like GPT, Claude, and Gemini, and only bring in a human when the models can't agree.

The authors tested this setup on brutally dense scientific papers, but the principle is completely universal. The combo maps perfectly onto financial reports, VC due diligence, contract parsing, and pulling competitor metrics out of PDFs. Anywhere a single wrong digit means a blown budget, this pipeline knocks out 95% of the grunt work without any heavy-duty coding.

Stop trusting the first answer ChatGPT hands you and hoping for some magic perfect prompt. A combo of custom-built prompts and multi-LLM consensus turns an unpredictable model into a rigorous measuring instrument. Grab the finished data on autopilot, and save humans for settling the genuinely disputed cases.

AI lab assistant

Apply this study to your task

Describe what you're working on. AI takes the method and the measured results from this paper and adapts them to your case, or writes a ready prompt built on them.

Based on Self-Prompting + Cross-Model Consensus: How to Make LLMs Reliably Extract Complex Data from Text arXiv:2608.19025

Sign in to apply this study New accounts get 50 free credits.