GUIDE · AI FUNDAMENTALS

Preparing documents and data for AI: quality, cleaning and structure

By the end of this guide you will know how to prepare company documents and data before using them with an AI system. You will see how to inventory your sources, how to classify and clean them, how to structure them and how to check that the result is reliable, without having to reorganise the whole archive at once.

Updated october 2026
8 min read
Altovar Technical Editorial Team

1. Why data quality determines the outcome

An AI system working on documents returns answers that are consistent with what it finds. If the documents are duplicated, out of date, contradictory or confusingly written, the answer will be too. The model does not know which version of a procedure is the current one, unless the structure of the document and its metadata make this clear.

That is why many AI projects discover, halfway through, that they are also a document management project. Data preparation is not a side task: it is often the part that determines whether the system will be useful. Planning it from the start avoids having to begin again when the first results disappoint. Every project that starts from documents should therefore include, from day one, a dedicated step for their quality.

2. What you need before touching the data

Before moving or processing a document you need three things. An inventory of sources, that is, a list of the places where documents are held: shared folders, business systems, mail archives, ticketing systems. An owner for each source, who can say which versions are valid. And a classification of sensitivity, so you know which documents can be used in a system and which cannot.

The source owner is often the missing link. When nobody is accountable for whether a document is valid, the system will treat it as true even if it is superseded. Assign this responsibility before indexing any content, because correcting afterwards costs far more. When the owner is clear, decisions about versions become quick and the system gives answers more consistent with the procedures in use.

3. The steps to prepare the data

The seven steps follow a logical order: first decide what goes in, then clean, then structure, and finally check. Skipping the order is a common mistake, because you end up carefully structuring a document that will later be deleted. Each step produces a verifiable result that feeds the next, and lets you go back without losing the work already done.

The permissions step is the one most easily forgotten. A confidential document that was visible only to one area in the original source can become accessible to everyone if it is uploaded to a single archive without rules. Check with each source owner how permissions must be rebuilt in the system. The check must be done on the real system and not only on the source folder, because access rules often change during upload.

  1. Inventory the sources: list the archives that contain documents useful to the use case, with the predominant format of each.
  2. Classify by sensitivity: mark each source as public, internal, confidential or containing personal data, and immediately exclude anything that cannot go in.
  3. Remove duplicates and superseded versions: keep one valid version of each document and archive the others outside the scope.
  4. Standardise the format: convert to readable, text-based formats and repair damaged or unreadable files.
  5. Add structure and metadata: title, validity date, department, owner and document status.
  6. Check permissions: make sure the system respects the same access limits the document has in its original source.
  7. Test on a sample: manually check a set of prepared documents before extending the work.

4. Common mistakes in preparation

The first mistake is trying to prepare everything. An archive of many years of documents is hard to clean and is often largely irrelevant to the chosen case. Work on the documents needed for the use case and widen the scope only once the first result has been verified. A small but clean scope is better than a large archive left half-finished.

The second mistake is cleaning without criteria. Deleting lines, normalising terms or rewriting texts can change the meaning of a document and create new errors. Every transformation must be documented and checked. The third is ignoring scanned documents: text in an image must be converted with optical character recognition (OCR), and the quality of the result must be checked on a sample, because reading errors are frequent in tables and marginal notes.

5. How to tell whether the work has succeeded

The preparation has succeeded when the system finds the right documents and when its answers can be traced back to a valid source. A simple check is to take a set of real questions and verify, for each, which document is used and whether it is the correct one. If the right document does not appear, the problem lies in indexing or structure. If it appears but is superseded, the problem lies in version management.

Repeat the check every time you add a source. A check done once loses value as soon as the archive changes, and new documents are often the least well curated. Note the date of each check and the number of problems found, so that you can see over time whether preparation is improving or worsening. If the number grows with each new source, that is the signal that the process for bringing documents in needs revising.

CheckWhat to verifySign of a problem
VersionIs the document used the valid one?Superseded procedures or drafts appear
CompletenessAre all the necessary documents present?Attachments or important sections are missing
ReadabilityIs the extracted text correct?Broken words, unreadable tables, odd characters
PermissionsDo users see only what they are allowed to see?A user obtains a confidential document
MetadataAre the title, date and owner present?Documents without a date or without an owner

6. Scanned documents, mixed formats and attachments

Real archives are rarely uniform. There are documents written digitally, scans of signatures and stamps, spreadsheets with merged cells, presentations with text inside images and emails with nested attachments. Each format requires different handling, and not all of them are suitable for being read by an AI system. Decide which formats go into the first scope and which stay out.

Tables deserve particular attention. A spreadsheet converted to text can lose the relationships between columns, and an answer that reads the wrong value can look correct. For tabular data it is often better to keep the structured source and connect it to the system in a controlled way, rather than turning it into free text. A document with well-structured tables at source can give more reliable results than a long free-text description.

7. How to get started

This week, choose the use case and inventory the sources needed, with the names of their owners. No formal project is required: a sheet with a few columns, such as source, format, owner, sensitivity and status, is already a useful inventory. Share it with the owners and ask them to confirm. The first concrete result matters more than a complete plan. Choose one person to take it forward and agree a review date with the process owner.

Then prepare a sample of documents by applying the steps in section three, and check it against the table in section five. The result will tell you how much work is really needed before extending the scope. Only then can you decide whether to automate the preparation or keep it as a manual procedure. Compare the time spent with the time planned and record it, so that the next decision rests on real data and not on estimates.

Frequently Asked Questions

Must I convert all documents into a single format?

Not necessarily. You need a readable, text-based format for the documents that enter the system, but there is no requirement to convert the entire archive. Concentrate on the documents within the chosen scope. Converting a whole archive without a precise purpose creates work and new errors, and makes it harder to tell which version is the valid one.

How long does preparation take?

It depends on the volume, the state of the archive and the number of sources involved. A tidy archive is much quicker to prepare than a scattered one. A reliable estimate is not possible without an inventory of sources. The first step exists precisely to produce a reasonable estimate.

Can I use the personal data contained in documents?

Only if you have an appropriate legal basis and have complied with the processing rules set out in the GDPR, including data minimisation and notices. It is often best to exclude personal data from the initial scope or reduce it to what is necessary. Check with your data protection contact before uploading documents that contain it.

Who should be involved in the preparation?

Usually a combination of people is needed: those who know the documents, those who manage the storage systems and those who check the quality of the result. The work is not purely technical. Someone who knows the process is often better placed to judge whether a version is valid than a technician who does not know it.

Does data quality need checking after launch too?

Yes. Documents change, procedures are updated and new files arrive every day. A periodic check, using a sample of real questions, shows whether the system is deteriorating. Assign this check to a specific owner, otherwise it quickly lapses.

About this content

General informational guide. Regulations and technical requirements change over time: always check the official sources and assess your specific case with a qualified technical or legal advisor.

GET IN TOUCH

Talk to our team.

We'll show how Altovar integrates into your infrastructure. No commitment, no sales pitch. Just a technical conversation.

BOOK A DEMO →