RAG and documents: why attaching a PDF is not enough for reliable answers

An assistant given documents may answer using those materials. To judge whether its answer is reliable, however, you need to check which passages it retrieved, whether they are current and whether they actually support what it says.

Original editorial diagram 01 / QUESTION 02 / EVIDENCE 03 / DECISION
↗ Original conceptual diagram Not a product screenshot
In this guide ⌄

The problem becomes concrete when an archive contains old procedures, missing attachments and documents restricted to different people. A well-written answer can conceal a failure in the information pipeline.

What RAG means

Retrieval-Augmented Generation combines information retrieval with text generation. The 2020 paper by Lewis and colleagues is a foundational reference for this architecture: externally accessible knowledge complements what a model has learned. It does not certify the answers of every product using the label. Original paper .

Attaching a PDF alone does not tell you how a service processes it: it might place the text in context, index it, select excerpts or combine these approaches. For a project, you need to establish what actually happens.

A citation lets you check a claim. The presence of a link does not prove that the claim is correct.

Following a piece of information

Stage Question to ask Possible failure
Ingestion Was the text read correctly? A table loses the relationship between its columns
Selection Was the relevant version retrieved? An outdated procedure appears
Answer Does the excerpt support the conclusion? The model adds a rule absent from the source

This is a proposed checking framework for a project, not a description of a particular commercial service. It separates three failures that otherwise receive the same label: “the AI got it wrong”.

A badly ingested PDF calls for checking the document. Retrieval of the wrong version calls for better metadata and selection criteria. An unsupported conclusion calls for checks on generation and on the system's ability to decline to answer.

An example: two conflicting procedures

ILLUSTRATIVE SCENARIO

Illustrative scenario: an expense claim

A 2023 procedure sets a 30-day deadline. A 2026 revision reduces it to 15 days, but only for travel expenses. These documents are invented to explain the method, not procedures belonging to a client.

The question “How long do I have to claim reimbursement?” lacks a necessary detail: what kind of expense? Answering “15 days” without clarification could be wrong even if the citation to the 2026 document is genuine.

The expected behaviour is to ask about the expense type, select the relevant document and state the applicable condition. If the archive cannot establish it, the answer should say so.

The latest date is not enough: a revision may cover a narrow area. Even a system that retrieves documents perfectly needs to establish whether the question contains enough information to choose between them.

How to prepare a useful evaluation

  1. 1

    Choose real questions and retain an expected answer with its source document and passage.

  2. 2

    Add ambiguous questions for which asking for clarification is the correct response.

  3. 3

    Include questions the archive cannot answer: missing information is a case to test.

  4. 4

    Separate retrieval from answering: inspect the excerpts first, then what the system writes.

  5. 5

    Repeat the test with outdated versions and conflicting documents.

  6. 6

    Check permissions with different users, without placing restricted documents in unauthorised environments.

A single score makes it harder to identify where to intervene. Recording the question, excerpts, version, answer, error and required correction is more useful. Metrics need a declared evaluation set: this article reports no accuracy percentage because no product has been evaluated.

What to check before connecting an archive

CHECKLIST

Check your project

0/6

A practical criterion is to select a wrong answer and reconstruct why it was produced. If we cannot distinguish the document, the selection and the conclusion, changing the prompt may leave the underlying problem untouched.

For a business document assistant, work with Row Tech can start with this inventory of sources, permissions and tests. Before choosing how much autonomy to grant, establish which information can justify its decisions.

Sources and scope

Antonio Ferone

Written by

Antonio Ferone

Personal projects, technical explanations and learning experiences.

Author profile ↗

THE NEXT STEP

Apply the method to your project

For a professional project, discuss sources, constraints and responsibilities with the Row Tech team.

Talk to Row Tech ↗

Frequently asked questions

The questions that matter

Does uploading a PDF mean a service uses RAG?

Not necessarily. Behaviour depends on the product and its implementation. Check the service's documentation and test it.

Is a page reference enough?

No. Open the passage and check that it supports the claim and the conditions stated.

Should I delete every old document?

Not necessarily. Older documents may be useful for historical enquiries, provided their version and validity remain distinguishable.

What if two documents contradict one another?

The system should expose the conflict or ask for clarification. Silently choosing a document can conceal an archive problem.

Can I promise it will never be wrong?

No. You can design checks and measure errors on a declared evaluation set without turning the result into a universal guarantee.

What should I test first?

A question for which you already know the answer and its source, followed by a question the documents cannot answer.

Continue reading

Projects and technical notes

Explore projects ↗

Explore related content

Find articles, projects and resources on the same themes.