Itility
Organized document folders and structured data sheets on a dark desk, illuminated by cool white light, showcasing clean record management.

What data does a RAG application actually need?

A RAG application needs structured, semi-structured, and unstructured documents that are clean, chunked appropriately, enriched with metadata, and governed well enough to be trusted in production. The quality of what a retrieval-augmented generation system retrieves determines the quality of what it generates: garbage in, hallucination out. The sections below walk through each layer of that data foundation, from document types to freshness requirements and governance.

What types of documents can a RAG application retrieve from?

A RAG application can retrieve from virtually any document type that can be converted into searchable text or vector embeddings. In practice, this includes PDFs, Word documents, HTML pages, Markdown files, plain text, spreadsheets, database records, support tickets, emails, and even transcripts from audio or video. The constraint is not the format itself but whether meaningful text can be extracted from it reliably.

For organizations in manufacturing, energy, or agritech, the document landscape is broader than it might first appear. Alongside standard business documents, relevant sources often include technical manuals, maintenance logs, process specifications, regulatory filings, sensor event logs, and structured outputs from MES or SCADA systems. Each of these can feed a RAG pipeline, provided the extraction and preprocessing steps handle the format correctly.

Semi-structured sources like JSON or XML exports from enterprise systems are increasingly common inputs. What matters is that the text extracted from any source is coherent, parseable, and representative of the knowledge you want the model to retrieve. A document that looks rich in a PDF viewer but extracts as garbled columns and headers will produce poor retrieval results regardless of how sophisticated the embedding model is.

How does data quality affect RAG output accuracy?

Data quality directly determines RAG output accuracy. If the documents in the retrieval index contain errors, contradictions, outdated information, or poorly structured text, the language model will retrieve that flawed content and use it as the basis for its response. Unlike traditional search, where a user can scan and discard a bad result, a RAG system synthesizes retrieved content into a generated answer, amplifying quality problems rather than filtering them.

The most common quality issues that degrade RAG performance include duplicate documents that create conflicting retrievals, boilerplate text that dilutes the signal-to-noise ratio, inconsistent terminology across business units, and unresolved references to entities that no longer exist. Each of these introduces ambiguity that the retrieval layer cannot resolve on its own.

Making data AI-ready for a RAG pipeline means applying the same quality disciplines that apply to any production data system: deduplication, standardization, validation against a schema or ontology, and lineage tracking so you know where each document came from and when it was last verified. The difference is that in a RAG context, quality failures are immediately visible to end users in the form of wrong, inconsistent, or confidently stated nonsense.

What is chunking and why does it matter for RAG?

Chunking is the process of splitting source documents into smaller segments before they are embedded and indexed. It matters for RAG because embedding models have token limits, and because retrieval works best when each indexed unit contains a focused, coherent piece of information rather than an entire document.

The goal of chunking is to create segments that are large enough to carry meaningful context but small enough to be retrieved with precision. A chunk that is too large retrieves too much irrelevant content alongside the relevant passage. A chunk that is too small loses the surrounding context that gives a sentence its meaning.

Common chunking strategies include fixed-size splitting by token count, sentence-based splitting, paragraph-based splitting, and semantic chunking where boundaries are placed at natural topic transitions. For technical documents like maintenance manuals or process specifications, structure-aware chunking that respects section headings and numbered lists typically outperforms naive character-count splitting. The right strategy depends on the document type, the average query length, and the embedding model being used.

What metadata should be stored alongside RAG documents?

Every document chunk in a RAG index should be stored with metadata that supports filtering, attribution, and trust. At minimum, this includes the source document identifier, the document type, the creation or last-modified date, the author or owning system, and the access permissions associated with the content.

Beyond the basics, useful metadata fields for production RAG systems include:

  • Topic or domain tags, so retrieval can be scoped to relevant knowledge areas
  • Language, critical for multilingual deployments
  • Confidence or review status, distinguishing verified content from draft or deprecated material
  • Chunk position, the index of the chunk within its parent document, enabling context reconstruction
  • Data lineage reference, linking back to the upstream source system or pipeline run

Metadata is what transforms a RAG system from a generic document search into a governed, auditable knowledge layer. It enables the application to filter results by recency, restrict retrieval to content a user is authorized to see, and surface citations that allow users to verify generated answers against source material. Skipping metadata at the indexing stage is one of the most common reasons RAG prototypes fail to scale into production.

How fresh does the data in a RAG pipeline need to be?

The required freshness of RAG data depends entirely on the use case. For a customer-facing product FAQ, weekly updates may be sufficient. For a system that answers questions about live operational status, safety procedures, or regulatory requirements, stale data is not just unhelpful; it is a liability.

The practical question is not “how fresh is fresh enough” in the abstract, but “what is the cost of a retrieval based on outdated information in this specific context?” In regulated industries or safety-critical environments, that cost can be significant. In those cases, the RAG pipeline needs near-real-time ingestion, automatic expiry or flagging of outdated chunks, and monitoring that alerts when the index has not been updated within the expected window.

For most enterprise use cases, a tiered freshness model works well: high-change sources like incident logs or pricing data are ingested continuously or daily, while stable reference content like product documentation or process manuals is refreshed on a weekly or monthly cycle. What matters is that the freshness policy is explicit, enforced in the pipeline, and surfaced to users when retrieved content may be out of date.

What data governance requirements apply to RAG applications?

RAG applications inherit all the data governance obligations that apply to the underlying documents they index. This means access control, data classification, retention policies, and audit logging must be implemented at the retrieval layer, not just at the source system. If a document is restricted to certain users, the RAG system must enforce that restriction at query time, not just at ingestion.

In 2026, two regulatory frameworks are adding concrete requirements for organizations building AI systems on top of enterprise data. The EU AI Act requires that high-risk AI applications demonstrate traceability of the data used to generate outputs. NIS2 imposes security and incident reporting obligations on organizations in critical sectors, including energy and manufacturing, that extend to the data infrastructure supporting AI tools.

Practically, this means a production-ready RAG system needs:

  • A data catalog that records what is in the index, where it came from, and who owns it
  • Role-based access control enforced at retrieval time, not just at document storage
  • Audit logs of what was retrieved in response to which query and by which user
  • A process for removing or updating documents when source data is corrected, expired, or subject to a deletion request
  • Documentation of the data pipeline from source to index, sufficient to satisfy a regulatory audit

Governance is not a layer you add after the RAG system is built. It needs to be designed into the data pipeline from the start, which is where many teams discover that their existing data foundation is not yet AI-ready.

How we help you build AI-ready data pipelines for RAG

Most organizations do not have a data shortage. They have a data trust problem, and RAG applications expose that problem immediately. At Itility, we work directly alongside your data team to build the foundation that makes RAG reliable in production: clean pipelines, governed indexes, and the OT-IT integration that brings in sensor data, MES outputs, and SCADA events alongside your standard enterprise documents.

Concretely, we help with:

  • Data platform design and build: architecture that supports AI-ready data flows from source to vector index
  • Pipeline engineering with built-in quality checks, so chunks entering your RAG index meet the quality bar your use case requires
  • Metadata and lineage frameworks, giving every retrieved document a traceable, auditable origin
  • Data governance implementation: access control, classification, and retention policies enforced in code, not just in policy documents
  • OT-IT integration: normalizing sensor data, historian databases, and MES outputs into your data platform so operational knowledge becomes part of your retrieval layer

If you are building a RAG application and want to make sure the data foundation will hold up in production, explore our data engineering services or get in touch with our team to talk through your specific setup.

Frequently Asked Questions

How do I know if my existing documents are ready to feed into a RAG pipeline?

Start by auditing a representative sample of your documents for the most common quality issues: garbled text extraction, duplicate content, inconsistent terminology, and missing or unreliable metadata. If your documents live in multiple systems with no unified ownership or versioning, that is a signal your data foundation needs work before indexing. A practical first step is running your documents through an extraction pipeline and manually reviewing the output text — what the embedding model sees is what determines retrieval quality, not how the document looks in its original viewer.

What is the best chunking strategy to start with if I'm new to RAG?

For most teams getting started, paragraph-based chunking with a token-count ceiling (typically 256–512 tokens) is a safe default that balances context and precision. Avoid fixed character-count splitting as your first approach, since it frequently cuts sentences mid-thought and degrades retrieval quality. Once your pipeline is running, test different chunk sizes against a set of representative queries and measure retrieval precision — chunking strategy is one of the highest-leverage variables you can tune without changing your embedding model or index architecture.

Can a RAG system handle documents in multiple languages reliably?

Yes, but it requires deliberate design choices at both the embedding and retrieval stages. You will need a multilingual embedding model (such as multilingual-e5 or multilingual versions of BGE) rather than an English-only model, and language should be stored as a metadata field on every chunk so retrieval can be scoped or filtered by language when needed. Be especially careful with mixed-language documents — for example, a Dutch-language manual with English technical terms — as these can confuse embedding models and produce inconsistent retrieval results without preprocessing.

What is the biggest mistake teams make when moving a RAG prototype to production?

The most common mistake is treating the prototype index as the production index — keeping the same unfiltered, unversioned document set that was good enough for a demo but was never governed or quality-checked. In production, users ask a much wider range of queries, and the edge cases in your document set become immediately visible as wrong or contradictory answers. Building metadata, access control, and a refresh pipeline from the start — rather than retrofitting them later — is what separates RAG systems that scale from those that quietly erode user trust.

How should I handle documents that get updated or deleted after they've already been indexed?

Every chunk in your index should carry a reference back to its source document, so that when a document is updated or deleted, all associated chunks can be identified and replaced or removed in a single operation. Implement a document versioning or hash-based change detection step in your ingestion pipeline so updates trigger automatic re-indexing rather than relying on manual intervention. Without this, your index will accumulate stale or contradictory chunks over time, and retrieval quality will degrade in ways that are difficult to diagnose.

Do I need a vector database specifically, or can I use my existing search infrastructure?

You do not necessarily need a dedicated vector database to get started — tools like Elasticsearch and OpenSearch support vector search natively alongside traditional keyword search, and hybrid retrieval (combining dense vector search with BM25 keyword matching) often outperforms pure vector retrieval for enterprise document sets. Dedicated vector databases like Pinecone, Weaviate, or Qdrant offer performance and filtering advantages at scale, but the right choice depends on your query volume, metadata filtering requirements, and what infrastructure your team already operates. Start with what integrates cleanly into your existing stack and migrate if you hit clear performance ceilings.

How do I measure whether my RAG system is actually retrieving the right content?

Build a retrieval evaluation set early: a collection of representative questions paired with the document chunks that should ideally be retrieved in response. Metrics like recall@k (did the correct chunk appear in the top k results?) and mean reciprocal rank give you a quantitative baseline to compare chunking strategies, embedding models, and index configurations against each other. Without a dedicated eval set, RAG improvements become subjective and regressions go undetected — this is one of the most underdone steps in most RAG implementations and one of the highest-value investments you can make before going to production.

Related Articles