How to Query Multiple Documents at Once with AI
How to query multiple documents at once with AI: build a per-document table, verify every citation that matters, and surface the gaps without blended answers.
If you want to query multiple documents at once with AI, most tools fight you: they're built around one file at a time. You upload a PDF, ask a few questions, get answers, and move on. That works fine until the question you actually need answered doesn't live in any single file.
"Which of these twelve vendor agreements auto-renew?" "Do our three security policies agree on how long we keep logs?" "What did each of these six studies use as a control group?"
Those are cross-document questions, and they're where most of the real work is. This guide covers the workflow that makes them reliable, what goes wrong when you do it naively, and how to structure the work so the answer is something you'd be willing to put your name on.
Why one-file-at-a-time doesn't scale
The obvious workaround is to just do it manually: ask the same question of each file, write the answers into a spreadsheet, and compare. For three documents, that's fine. For thirty, it's a day of work, and it fails in ways that are easy to miss.
You lose the comparison. Answers produced in separate sessions aren't calibrated against each other. Ask "what's the notice period?" of twelve contracts one at a time and you'll get twelve differently-shaped answers — one says "30 days", one says "one month", one says "thirty (30) days' written notice to the address in Section 14". Comparing them is a second job.
Silence is invisible. When you ask each file separately, a document that simply doesn't address your question produces a vague non-answer rather than an explicit gap. Across a set, the documents that don't say something are often the finding.
The second-pass questions never happen. Real analysis is iterative: you notice something in document four, then want to check it against the other eleven. If each check costs a fresh upload and a fresh session, you stop asking.
The failure mode to design around: blended answers
Here's the specific thing that goes wrong when you point an AI at a folder and ask a broad question.
The model retrieves passages from across the whole set, and then writes one fluent paragraph that merges them. It reads beautifully. It's also frequently a composite of two different documents' terms, presented as though it were one coherent policy. The notice period from Contract A gets attached to the termination trigger from Contract C, and nothing in the output tells you that happened.
This is worse than a plain hallucination, because every individual fact in the answer is true — just not true together. A blended answer passes a casual read and fails an audit.
Two things prevent it, and you need both:
- Per-document attribution. Every claim in the answer has to be traceable to a specific file and a specific passage inside it, not just to "your documents."
- Per-document structure. Ask questions whose answers naturally decompose per source — a row per document — rather than questions that invite a single synthesized paragraph.
We'll use both below. If you want the background on why grounding and citations matter in the first place, the piece on what "grounded AI" actually means covers the mechanics.
The workflow
Step 1: Define the set deliberately
Before uploading anything, decide what belongs in the set and write it down. "All the vendor contracts" is ambiguous — does it include the expired ones, the amendments, the unsigned drafts?
This matters more than it sounds. Every cross-document answer you get is implicitly scoped to the set, and if the set is wrong, the answer is wrong in a way no citation will catch. An AI can tell you "none of these agreements contain an assignment clause" with perfect accuracy, and you'll still be misled if the one that does was sitting in a different folder.
Be especially careful with:
- Amendments and addenda. An amendment that changes a term must be in the set, or the original's superseded language will read as current.
- Versions. If you have both
policy-v2.pdfandpolicy-v3-final.pdf, include one, or the AI will faithfully report a contradiction that doesn't exist. - Near-duplicates. Two exports of the same document double the apparent weight of whatever it says.
Name files so a human reading the citation immediately knows what it is. acme-msa-2024-signed.pdf beats scan_0043.pdf, and the filename shows up in every answer you get back.
Step 2: Upload the whole set, then orient before analyzing
Load every document into one workspace. Then — before asking your real question — ask an orientation question. Something like:
List every document in this workspace with its title, date, and parties or authors.
This takes ten seconds and catches a surprising amount: the file that failed to parse, the scan that came through as an image with no extractable text, the contract you thought you'd included and hadn't. It also gives you a canonical list of names to refer to in later questions.
If a document comes back with no content, deal with it now. A file that's silently unreadable will show up later as "this document does not address X" — indistinguishable from a real gap.
Step 3: Ask the question as a table, one row per document
This is the single highest-leverage habit for multi-document work. Instead of:
What are the termination terms in these contracts?
ask:
For each contract, give me: file name, notice period required, who may terminate for convenience, and whether there is an auto-renewal. One row per contract. If a contract does not specify a field, write "not specified" rather than inferring it.
The table format does three things at once. It forces per-document answers, so nothing blends. It makes gaps explicit and countable. And it's directly comparable — you can scan a column and see the outlier immediately.
That last instruction — write "not specified" rather than inferring — is doing real work. Without it, models tend to fill empty cells with what's typical rather than what's written. With it, an empty cell becomes a finding. The same technique applies when you're pulling structured data out of a single file; there's more on it in the guide to extracting data from PDFs into a table.
Step 4: Verify the column that matters before trusting the table
A table of forty cells looks authoritative. Don't grant it that. Pick the column your decision actually turns on — usually there's one — and open the citation behind every cell in it.
In FileAI, each answer carries numbered citations that open the exact source passage, so verifying a cell means clicking it and reading the sentence it came from. You're checking for three things:
- Does the passage say what the cell says? Usually yes. Occasionally the passage is adjacent to the answer rather than containing it.
- Is it from the right document? This is the blending check. A cell attributed to Contract F should cite Contract F.
- Is it the operative clause? Contracts in particular love to state a rule and then modify it two sections later. A citation pointing at the first mention is correct-but-incomplete.
Spot-checking one column across every document takes a few minutes and tells you whether the rest of the table is trustworthy. If that column is clean, the others usually are. If you find two errors in it, stop treating the table as data and go back to narrower questions.
Step 5: Chase the disagreements
Once the table is populated, the interesting cells are the ones that don't match. Follow them with targeted questions naming specific documents:
Policy A says logs are retained for 90 days and Policy C says 12 months. Quote the retention language from each and tell me whether either one references the other or carves out an exception.
Naming the documents explicitly is what keeps the answer scoped. It also gives you the two passages side by side, which is usually enough to tell a genuine conflict from a difference in scope — Policy A covers application logs, Policy C covers audit logs, and there was never a contradiction.
This is where multi-document querying earns its keep. Finding conflicts across a policy set by hand means holding both documents in your head at once; doing it as a pair of quoted passages takes a minute. The same approach drives comparison work generally — the walkthrough on comparing two research papers with AI goes deeper on the two-document case.
Step 6: Ask what's missing
The question most people skip:
Which of these documents do not address data retention at all? List them separately from the ones that address it partially.
Absence is hard to see in a table and easy to see in a list. For compliance work it's often the entire point — the gap is the finding, not the variation. This is also the question where a tool that says "I don't know" rather than inventing plausible content is worth the most. A model that fabricates a retention clause for the one document that lacks one has hidden exactly what you were looking for.
Step 7: Re-run the set, don't rebuild it
When a new contract arrives or a policy gets revised, add the file to the existing workspace and re-ask the table question. You get an updated comparison in a minute, and you can diff it against the last one. This is where the up-front cost of step 1 pays back — a well-defined, well-named set is an asset you query repeatedly, not a one-off.
When to split the set instead
Bigger is not always better. Split into separate workspaces when:
- The documents answer to different questions. Mixing forty contracts with your engineering docs makes retrieval noisier without making any answer better.
- The set spans incompatible regimes. EU and US policies, or 2019 and 2026 standards, will generate contradictions that are artifacts of scope rather than real conflicts. Query them separately, then compare the two summaries.
- You're past the point of verifying. If the set is large enough that you can't spot-check a column, you can't stand behind the output. Break it into batches you can actually audit.
There's no magic number. The practical test is: can you verify the column that matters? If not, the set is too big for the decision you're making.
Fast answers vs. careful ones
Not every cross-document question deserves the same effort. Orientation questions, "which files mention X", and single-field lookups are fast — you want the answer in seconds and you'll verify it by eye.
The table question in step 3 is not that. It's reading every document for several fields at once, and it's worth letting the AI work harder: more retrieval passes, more cross-checking, a slower answer. FileAI splits this explicitly into Fast and Deep modes, and the rough rule is that anything producing a row per document should run in Deep. The extra wait is trivial compared to re-doing a table you didn't trust.
Honest limits
A few things this workflow does not fix.
Scanned images without OCR. If the text isn't extractable, the document is invisible to retrieval, and you'll get "not specified" for a clause that's plainly there on the page. Step 2's orientation question catches this; nothing else will.
Tables and exhibits. Complex multi-page tables, appendices, and fee schedules are the weakest area for document AI generally. Pull those cells one at a time and verify each.
Cross-references outside the set. A contract that incorporates "the Supplier Code of Conduct available at..." by reference is pointing at something you haven't uploaded. The AI will not follow that link, and shouldn't. Track incorporated-by-reference documents manually and add them to the set if they matter.
Judgment. The table tells you which contracts auto-renew. It does not tell you which renewal is a problem. That's still your job, and it's the part worth your time — which is rather the point of automating the retrieval.
A note on privacy
Cross-document work means uploading a set — often an entire matter, a full policy library, or a client's whole document room. The aggregate is more sensitive than any single file in it, and it's worth being deliberate about where it lands.
FileAI keeps uploaded files private and doesn't train models on them unless you explicitly opt in, and deleting a document removes it. If you're evaluating tools for this kind of work, the rundown on whether it's safe to upload confidential documents to AI tools covers what to check in a provider's terms before you upload anything real.
The short version
Querying multiple documents at once works well if you structure it:
- Define the set deliberately — amendments in, duplicates out, clear filenames.
- Upload everything, then ask an orientation question to catch parse failures.
- Ask for a table, one row per document, with "not specified" for gaps.
- Verify every citation in the one column your decision depends on.
- Chase disagreements by naming the specific documents.
- Ask explicitly what's missing.
- Keep the workspace and re-run it as the set grows.
The habit underneath all of it is simple: make the AI answer per document, and make every cell openable. Blended answers are the failure mode, and per-document attribution is the fix.
You can see how this plays out across a full document set on the research and analysis page, or for policy libraries specifically, compliance querying. If you'd rather just try it on your own files, start free with a document — no card required — upload three or four related files and ask for the table.