Own Weights

Does fine-tuning reduce hallucinations? Extraction results

Does fine-tuning reduce hallucinations? Often, on one narrow task with real outputs. Here is what we measured in extraction and where it stops helping.

Updated

Often, yes, for one narrow task. Fine-tuning can reduce invented fields and text in document extraction when the model is trained on real, correct outputs from that task. It teaches the model to copy the answer from the page and to return a null when the page is silent. It does not make a model understand your documents in general, and it does not remove the need for a test.

Why does AI make up information from documents?

A language model predicts the next likely words. When a field is missing, unclear, or written in an unusual layout, the most likely words can be a value that sounds right but is not in the document. Three things make this worse: long contracts where the answer sits far from the question, fields the document never mentions, and output formats the model has to guess at. A prompt that says to copy the exact text or return null helps. The model still drifts on the fields it sees least often.

Fine-tuning changes those odds. Each training example shows a passage, the question, and the exact text a person marked as the answer. Over many examples the model learns that a field is either copied from the page or left empty, and that a guessed value counts as a miss. The gain comes from the data, so it only works if the answers in the data are right.

What we measured on contract extraction

The test used CUAD, a public dataset of 510 commercial contracts with answers marked by lawyers. The task was to find 10 kinds of passage and quote each one exactly. Every document was scored by a model that never saw it in training, using 5-fold cross-validation, so no document was graded by a model trained on it.

Scores are the share of exactly right quotes, where 1.0 is perfect. Our Accuracy model scored 0.717. Our Standard (fast) model scored 0.650. Claude Opus scored 0.635 and Claude Haiku scored 0.584. Our lead over Opus was +0.082 and over Haiku +0.133, and both leads are larger than the margin of error. Our models were ahead of both Claude models in all 5 groups of 102 documents.

Claude took the exam with one prompt, with no examples and no task training. Our models were fine-tuned for this exam. That shows what training for one task does. It is not a legal product or legal advice, and it does not mean our model beats Claude at everything. The score also measures exact copying, not hallucinations directly, so read it as a proxy for invented text.

The price gap is part of the case. On the exam, priced per 1,000 documents, our Accuracy tier came to $4.50, Claude Opus to $154.49 at list price, and Claude Haiku to $4.95.

How to stop an LLM hallucinating fields

These steps help with or without fine-tuning:

  • Require the exact quote and its position for every field. Reject any value that does not appear in the source text. A substring check is cheap and catches many invented values.
  • Test the empty case on purpose. Include documents that lack each field, and check that the model returns null instead of a nearby value.
  • Fix the output format with structured output, so the model cannot wrap a guess in extra text. See /guides/llm-json-reliability/.
  • Score each field on its own. An overall score hides a field that fails often.
  • Build the test from your own documents, with answers checked by people who know the domain. See /guides/build-llm-test-set/.

Fine-tuning vs RAG for hallucinations

Retrieval-augmented generation (RAG) fetches passages and gives them to the model when it answers. It helps when the answer lives in a large or changing library, and it gives you a source to check. It does not change how the model writes, so it can still invent a field from retrieved text that does not contain it.

Fine-tuning changes how the model behaves on one task. For extraction from a known document type, training is usually the more direct fix for invented fields. For questions across a large, changing set of documents, retrieval usually has to come first. Many teams use both. The full comparison is in /guides/fine-tuning-vs-rag/.

Can a fine-tuned model still hallucinate?

Yes. Fine-tuning can lower the error rate on the task it was trained for. It does not reach zero. Expect misses on documents unlike the training set, on fields with few examples, on scans with OCR errors, and on questions the document does not answer at all. Wrong or inconsistent training answers teach the wrong habit, so check the training data first when results are poor.

Fine-tuning is the wrong fix in some cases. If you have only a handful of documents, if the task changes every month, or if the real problem is that the source text is missing or unreadable, fix the input or the retrieval first. Training cannot add information the document does not contain.

Own Weights fine-tunes an open-weight model for one high-volume task, tests it against your current model on your own data, and serves it in your own cloud account or on-prem. You own the weights. The trained model has to beat the current model on that test before it is deployed. Start with the free AI cost audit at /free-ai-cost-audit/ to find the task, or talk to us about the test.

Questions

does fine-tuning reduce hallucinations

Often, for one narrow task trained on correct outputs from that task. In our contract extraction exam, the fine-tuned models quoted more text exactly than the Claude models we tested. Treat that as evidence for narrow tasks, not a general rule.

why does AI make up information from documents

The model predicts likely words, and a plausible value can score higher than an honest empty field. Long documents, missing fields and unclear layouts make this more common. Asking for an exact quote per field makes invented values easy to detect.

fine-tuning vs RAG for hallucinations

RAG gives the model retrieved passages and a source to check, which helps when the answer sits in a large or changing library. Fine-tuning changes how the model handles one task. Many teams use both, starting with whichever failure they measure first.

can a fine-tuned model still hallucinate

Yes. Fine-tuning lowers the error rate on its trained task but does not remove it. Expect misses on unusual documents, rare fields and questions the document cannot answer, so keep testing after deployment.

how to stop an LLM hallucinating fields

Ask for the exact source text behind each field, and discard any value the source does not contain. Test documents that lack each field and check that the model returns null. Score fields one at a time so one weak field does not hide.