How to Build an AI Tool That Answers Questions From Your Files

Build an AI tool that answers from your own files without coding: choose and prepare files, write grounding instructions, test, and share with care.

Your team keeps asking the same questions: how to request time off, which form a refund needs, what the onboarding checklist says. The answers are already written down, scattered across a handbook and a shared folder. An AI tool that answers from those files, pointing to the page it used, can save people the hunt. Built carelessly, it can also give confident answers the files never contained.

The short version: pick one narrow job and a small set of current, approved files. Load them into a knowledge-base feature in a tool you can configure without code. Tell it to answer only from those files, to name the file and section behind each answer, and to say plainly when the files don’t cover a question. Then test it with questions whose answers you already know. It’s written for non-coders who want a first working version for themselves or a small team. Answering from your files can lower the rate of wrong answers, but a study of commercial legal research tools that work this way found it doesn’t remove them [1]. If you’re new to building with AI, start with the overview of how to build with AI without learning to code. If your information lives in rows and columns, the previous guide on connecting AI to a spreadsheet fits better.

TL;DR

  • Start with a one-sentence job and only the current, approved files it needs, cleaned up: one version each, clear names, no image-only pages or passwords.
  • Instruct the tool to answer only from the files, cite the file and section, and say when it can’t find an answer.
  • Test with known answers, unanswerable questions and changed rules, and rerun the tests after every file change.
  • Before sharing, assume everyone who can use the tool can see every file in it, and read the vendor’s data terms for your account type.

What you’re building, in plain words

A knowledge base here means the set of files you give an AI tool to answer from. Once there’s more than a little text, the tool doesn’t read every file top to bottom. Google, for example, says Gemini Notebook (formerly NotebookLM; Google announced the new name in July 2026) retrieves the most relevant information first when a notebook holds many sources, but references the whole document when a source is very short [2, 3, 4]. In the usual design, a retrieval system first searches your files for the passages that best match the question, then hands those passages to an AI model, which writes the answer from them [5]. Researchers named this approach retrieval-augmented generation, or RAG, in a 2020 paper that paired a language model with a searchable document index [6]. Retrieval is the search step; grounding is the goal of tying each answer to that retrieved text.

Because the knowledge sits in the documents rather than inside the model, you change what the tool knows by replacing a file, not by retraining anything [6]. The flip side: an old file left in the collection can still be quoted.

A citation in this setting is the tool’s pointer to the passage it used, often a clickable quote. Instructions (sometimes called a system prompt) are the standing directions that shape every answer, such as “answer only from the documents.”

Most of the tools below are no-code: you set everything up through menus, upload buttons and text boxes. One example, Microsoft Copilot Studio, is described by Microsoft as low-code [7]. The guide to no-code, low-code or custom code explains the difference.

Does answering from your files stop wrong answers?

It reduces them. It doesn’t stop them.

In a 2021 study of research chatbots that looked up Wikipedia passages before replying, the best retrieval-based models cut hallucinated responses (invented or unsupported statements) by more than 60% compared with standard models that didn’t look anything up, judged by automatic metrics and human raters [8, 9]. Those were research systems answering general-knowledge questions, not today’s products or your files.

A preregistered study of commercial legal research tools built on retrieval, which put more than 200 legal questions to them between March and May 2024, found a less flattering picture [1]. The researchers quote legal research providers’ marketing that described retrieval as “eliminating” or “avoid[ing]” hallucinations, or promised “hallucination-free” citations [1]. The Stanford-led researchers found each tool hallucinated less often than general-purpose GPT-4, yet still produced hallucinated answers on 17% to 33% of the queries [1]. They counted an answer as a failure if it was wrong or if it cited a source that didn’t support it [1]. We read the May 2024 preprint; a journal version appeared in the Journal of Empirical Legal Studies in 2025 [10]. The products have changed since and legal research is a specialized domain, so read those percentages as evidence the problem persists, not as a rate for your tool.

A third source explains how failures happen. In an experience report from three RAG projects in research, education and biomedicine (we read the arXiv preprint, which names a 2024 AI engineering conference), Deakin University researchers found that a question related to the documents but not actually answered in them could fool the system into answering anyway, instead of saying it didn’t know [5]. It was a small practitioner study, not a controlled benchmark.

Where the evidence is thin: we found no study of error rates for the no-code knowledge-base tools named here, working from small-team files. The practical conclusion is ours, not the researchers’: keep a citation on every answer, accept “I couldn’t find that” as a good answer, and have a person check anything that matters. For a method, see how to check whether an AI answer is correct.

Step 1: Choose one job and a small set of files

Write the tool’s job in one sentence, such as “Answer staff questions about our leave and expense procedures, citing the handbook.” A narrow job makes files, instructions and wrong answers easier to pin down. (This and the other checklists in this guide are our editorial suggestions, not findings from the sources.)

Then list only the files that job needs:

  • final, approved versions, not drafts or meeting notes;
  • one person who owns each file and can say whether it’s current;
  • nothing sensitive unless your organization has approved this tool for it.

OWASP, a nonprofit security community, counts personal information, financial details, health records, confidential business data, security credentials and legal documents among the sensitive information an AI application can expose [11]. It warns that weak access controls can let a retrieval system disclose such content, and that restrictions written into a system prompt may not always be honored [12, 11]. A line like “don’t share anyone’s home address” (our example) is a request to the model, not a lock on the file. If a file shouldn’t be seen by everyone who will use the tool, leave it out.

Step 2: Prepare the files

Keep one current version of each document. OWASP notes that documents from different sources can contradict each other, creating knowledge conflicts in retrieval systems [12]. Leave an old refund procedure next to its replacement and either can surface in an answer, so move superseded versions out of the tool’s reach.

Give files clear names and titles. In the Deakin team’s education case study, adding the file name to retrieved passages helped the model find the right information [5]. The help pages we checked for the three tools below don’t say whether they pass file names to the model, but clear names also make citations easier for people to check: “Expense policy v3 (approved March)” beats “final-final-2”.

Prefer clean, text-based layouts. OpenAI’s guidance for its GPT builder advises text-forward files and warns that complex layouts can make uploaded content harder to use [13]. Microsoft’s Copilot Studio reads images only when they’re embedded in PDFs and recommends detailed alt text (a written description of the image) [14]. If key information sits only in a diagram or a scanned page, add a text version.

Remove password protection. Copilot Studio doesn’t accept encrypted files, such as files with sensitivity labels or passwords [14].

Be careful with spreadsheets. Google limits Google Sheets sources in Gemini Notebook to 100,000 tokens, a measure of text length the help page doesn’t translate into words or rows [4]. For tables of numbers, the spreadsheet guide is a better fit.

Check where each file came from. Text inside a file can act as instructions to the AI, which OWASP calls indirect prompt injection, and that text doesn’t have to be visible to a person [15]. OWASP describes a tampered document in a retrieval system’s collection leading the model to give misleading results, and notes that retrieval doesn’t fully protect against this [15]. Its advice is to accept documents only from trusted sources and to check them before they go into the collection [12].

Step 3: Load the files into a knowledge-base feature

In the three tools below, the process is broadly similar: create a space for the tool, add your files (uploaded copies or links to a cloud drive), add instructions, then ask questions. What differs is the limits, how files stay current and what the vendor says it does with your data; the details below come from each vendor’s documentation as we checked it on Nov 20, 2026 [4, 16, 14]. They are examples, not endorsements; for how to compare platforms, see choosing a no-code AI platform.

Example (as of Nov 20, 2026)Where files goDocumented limitsWorth knowing
Google Gemini NotebookSources added to a notebook50 sources per notebook without a paid AI plan, up to 600 on the highest paid tier; each source up to 500,000 words or 200 MB [4, 17]Google Drive imports sync every few minutes; uploads are copies [4]
ChatGPT projects (OpenAI)Files and instructions inside a project5 files per project on Free, 25 on Go and Plus, 40 on Pro, Business, Enterprise and Edu; 10 files per upload [16]A Google Drive app added to a project doesn’t sync content in advance [16]
Microsoft Copilot Studio (low-code; limits for agents on its standard harness)Files uploaded as an agent’s knowledge, or SharePoint linksUp to 500 files, also capped by your organization’s Dataverse file storage; no file over 512 MB; no image, video or audio files [14]Your environment needs Dataverse search turned on by an administrator [14]

Gemini Notebook accepts Google Docs, Slides and Sheets, PDFs, Word, text, Markdown, CSV and PowerPoint files, web links and pasted text, among others [4]. Google describes its chat as answering from your sources with in-line citations that quote them [18, 3]. The same help page also lists experimental chat functions, usable with or without sources, that can search the web or run code, and tells users to double-check results, so not every answer necessarily comes from your files [18]. You can only import Drive files you can at least view, and a source becomes inaccessible if you lose access to the original or it’s deleted [4]. Work or school accounts need an administrator to turn the product on [3]. Google labels its plan limits as subject to change [17].

ChatGPT projects keep related chats, files and instructions together, and project instructions apply only inside that project [16]. If you’ve seen older advice to build a “custom GPT,” note that OpenAI plans to retire custom GPTs on Dec 11, 2026 (Feb 28, 2027 for some workspaces), no longer lets personal accounts create new ones, and points people who used them for instructions plus reference files toward projects or its newer plugins [13, 19].

Copilot Studio is aimed at organizations building AI agents connected to their own data and systems, and accepts Word, Excel, PowerPoint, PDF, text, HTML and CSV files, among others [7, 14]. It runs in an organization’s Microsoft environment, where an administrator controls settings such as Dataverse search, so it suits readers who already work inside one [14]. Its agents run on one of three “harnesses” (Microsoft Copilot, Customer Conversation or standard); the file limits above are from Microsoft’s standard-harness page [7, 14].

Before uploading anything, read the vendor’s data terms for your account type. Two examples, as stated on the vendors’ pages on Nov 20, 2026 [20, 21]:

  • Google says content in Gemini Notebook isn’t used to directly train its foundation models unless you give feedback, in which case trained human reviewers may see the related content, kept for up to three years without your account attached [20]. Google adds that data Gemini Notebook shares with other Google services, such as the Gemini app, follows Google’s privacy policy and those services’ notices, including for product improvement [20]. For Google Workspace and Workspace for Education accounts, Google says uploads, questions and answers aren’t reviewed by people or used to train AI models [20, 3].
  • OpenAI says data sharing for model training is on by default for personal ChatGPT Free, Plus and Pro accounts and can be switched off, that it doesn’t train on Business, Enterprise or Edu workspace content by default, and that giving feedback can make a whole conversation available for training [21].

We didn’t verify Microsoft’s training terms for Copilot Studio knowledge files, so check your organization’s agreement. Plans, prices and usage limits differ across all three; the guide to what no-code AI tools cost covers that.

Step 4: Write instructions that keep answers tied to the files

Put rules and behavior in the instructions and reference material in the files. OpenAI’s builder guidance draws that same line, and adds that if you want the tool to cite or quote uploaded content, you should say so in the instructions and specify the format [13].

Instructions for a document question-answering tool might cover these points (our wording, adapt it):

  1. Answer only from the attached documents. If they don’t contain the answer, say “I couldn’t find that in the documents” and suggest who to ask.
  2. After each answer, name the document and section you used, and quote the key sentence.
  3. If two documents disagree, show both and say which is dated later. Don’t pick one silently.
  4. Don’t guess, and don’t fill gaps from general knowledge.
  5. If a question covers several documents, answer each part separately.

The fifth point comes from the Deakin report, which uses a question spanning several documents as its example of an incomplete answer and suggests asking such questions separately [5].

Some tools add settings too. In Gemini Notebook you can choose which sources the chat uses and set a style or role under Configure Chat [18]. Copilot Studio has an “Allow ungrounded responses” setting for agents with generative orchestration turned on; turned off, it blocks answers produced without consulting a knowledge source or tool and returns knowledge answers only when they carry an in-text citation [22]. Microsoft adds that turning the setting off doesn’t guarantee the agent never uses general knowledge, and that sometimes a correct answer is withheld because the model left out a citation [22]. Microsoft suggests asking for citations in the instructions and avoiding instructions that strip out sources or force a rigid format [22].

Tone, greetings and handing a conversation to a person are chatbot design questions; the next guide, on building a basic AI chatbot, covers them.

Step 5: Test with questions you already know

Write ten to twenty questions, with the correct answer for each, before you share the tool. A short checklist (our suggestion):

  • Known answers: does the answer match, and does the cited passage actually say it?
  • Related but unanswerable: questions close to your topic that the files don’t cover. The right result is “I couldn’t find that” [5].
  • Changed rules: a question whose answer changed between versions. Does it quote the current one?
  • Multi-file questions: is anything missing from the answer?
  • Off-limits material: ask for something that shouldn’t be in the files at all. If it appears, remove the file.

The Deakin researchers concluded that a RAG system can only be fully validated once it’s in real use and that its robustness develops over time [5]. Passing your test list is a starting point, not proof. Keep the list and rerun it whenever you add or replace a file. The full method, including edge cases and a small pilot, is in testing a no-code AI project before sharing it.

Step 6: Share carefully and keep it current

Sharing a knowledge-base tool often shares the files too:

  • A viewer of a shared Gemini notebook has read-only access to all the shared source documents. Google says its Chat View link hides the sources but doesn’t remove that underlying access [23].
  • In a shared ChatGPT project, members with chat access can see the project’s chats, files and instructions [16].
  • In Copilot Studio, uploaded documents have no per-user sign-in check, while SharePoint sources use each person’s own sign-in, so the agent only surfaces content that person can access [22].

A cautious default for a shared collection, based on OWASP’s access-control advice: include only files every user is allowed to see [12]. If different people need different documents, or you want the AI to take actions, the published guide How to Build an AI Agent That Uses Your Documents Safely goes further. Protecting personal information that people type in is covered by BuildAIQ’s Building AI Applications guides, including a planned one on safeguarding that information inside AI apps. Putting the tool on a public website raises further risks, covered in putting an AI feature on your website.

Then keep it current. Name an owner, give each file a review date, and swap in new versions the day they’re approved. Know whether your sources are synced links or uploaded copies, since an uploaded copy doesn’t change when the original does [4]. Keep the originals in your own folders, not only inside the tool, so you can move later; see avoiding lock-in to one platform.

Worked example (hypothetical): a staff handbook helper

This is an illustration, not a real organization or a tested setup. A six-person office keeps a procedures handbook, a leave policy, an expense policy and an onboarding checklist in a shared drive, and the office manager wants new staff to find answers without interrupting colleagues.

  • Job: “Answer staff questions about office procedures, leave and expenses, citing the handbook or policy.”
  • Files in: the four current documents, renamed with dates. Files out: last year’s policies, anything about individual pay, health or performance.
  • Instructions: the five points from Step 4, plus “For anything about pay, health or a dispute, refer the person to the office manager.”
  • Tests: “How many days’ notice for leave?” (known answer), “Can I expense a gym membership?” (not covered), “What’s the mileage rate?” (changed this year), and a question that touches leave and expenses together.
  • Upkeep: the office manager reruns the tests whenever a policy changes and spot-checks a few answers monthly against the cited pages.

The result is a helper that points to the right page, not an authority; anything affecting someone’s pay or rights still goes to a person.

When it goes wrong: likely failure points and fixes

It answers confidently when the files say nothing. Strengthen the “say you couldn’t find it” instruction, add related-but-unanswered questions to your tests (Step 5), and tell users an uncited answer isn’t confirmed.

It quotes an outdated rule. Remove old versions (Step 2), date your titles, and check whether uploads are copies that never update [4].

The citation doesn’t back up the answer. The legal-tools researchers counted this as a failure in its own right [1]. Read the cited passage before acting.

No answer, though the information is there. With ungrounded responses turned off, Copilot Studio can withhold an answer that lacks a citation [22]. Rephrase, add citation instructions, or check whether the file was accepted at all: encrypted files, standalone image files and files over 512 MB aren’t supported [14].

Part of the answer is missing. Split multi-document questions into one question per document (Step 4).

Someone sees a file they shouldn’t. Remove the file, review who has access (Step 6), and keep the shared collection to files everyone may see.

A file steers the AI. Hidden instructions in a document are indirect prompt injection (Step 2); add files only from trusted sources, after reviewing them [15, 12].

Practical Takeaways

If you’ve followed the steps, you have a first version that answers from a small set of approved files and shows where each answer came from.

  • Start with a one-sentence job and only the current, approved files it needs, cleaned up: one version each, clear names, no image-only pages or passwords.
  • Instruct the tool to answer only from the files, cite the file and section, and say when it can’t find an answer.
  • Test with known answers, unanswerable questions and changed rules, and rerun the tests after every file change.
  • Before sharing, assume everyone who can use the tool can see every file in it, and read the vendor’s data terms for your account type.
  • Treat every answer as a pointer to a page you can check, not as the final word.

Sources

  1. Hallucination-Free? Assessing the Reliability of Leading AI Legal Research Tools. arXiv, 2024-05-30, accessed 2026-11-20.
  2. NotebookLM is now Gemini Notebook. Google (Google Workspace Updates blog), 2026-07-16, accessed 2026-11-20.
  3. Learn about Gemini Notebook. Google (Gemini Notebook Help), accessed 2026-11-20.
  4. Add or discover new sources for your notebook. Google (Gemini Notebook Help), accessed 2026-11-20.
  5. Seven Failure Points When Engineering a Retrieval Augmented Generation System. arXiv (CAIN 2024 experience report), 2024-01-11, accessed 2026-11-20.
  6. Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. arXiv (NeurIPS 2020 paper), 2020-05-22, accessed 2026-11-20.
  7. What is Microsoft Copilot Studio?. Microsoft Learn, 2026-10-27, accessed 2026-11-20.
  8. Retrieval Augmentation Reduces Hallucination in Conversation. arXiv, 2021-04-15, accessed 2026-11-20.
  9. Retrieval Augmentation Reduces Hallucination in Conversation (ACL Anthology record). Association for Computational Linguistics, 2021-11, accessed 2026-11-20.
  10. Hallucination-Free? Assessing the Reliability of Leading AI Legal Research Tools (Stanford Law School publication record). Stanford Law School, 2025-06, accessed 2026-11-20.
  11. LLM02:2025 Sensitive Information Disclosure. OWASP Gen AI Security Project, accessed 2026-11-20.
  12. LLM08:2025 Vector and Embedding Weaknesses. OWASP Gen AI Security Project, accessed 2026-11-20.
  13. Creating and editing GPTs. OpenAI (OpenAI Help Center), 2026-11-19, accessed 2026-11-20.
  14. Upload files as a knowledge source – Microsoft Copilot Studio. Microsoft Learn, 2026-09-30, accessed 2026-11-20.
  15. LLM01:2025 Prompt Injection. OWASP Gen AI Security Project, accessed 2026-11-20.
  16. Projects in ChatGPT. OpenAI (OpenAI Help Center), 2026-11-20, accessed 2026-11-20.
  17. Learn about Gemini Notebook's plans. Google (Gemini Notebook Help), accessed 2026-11-20.
  18. Use chat in Gemini Notebook. Google (Gemini Notebook Help), accessed 2026-11-20.
  19. Custom GPT retirement and migration FAQ. OpenAI (OpenAI Help Center), 2026-11-19, accessed 2026-11-20.
  20. Privacy and Terms of Use in Gemini Notebook. Google (Gemini Notebook Help), accessed 2026-11-20.
  21. Data controls in ChatGPT. OpenAI (OpenAI Help Center), 2026-11-20, accessed 2026-11-20.
  22. Knowledge sources summary – Microsoft Copilot Studio. Microsoft Learn, 2026-08-04, accessed 2026-11-20.
  23. Create a notebook in Gemini Notebook. Google (Gemini Notebook Help), accessed 2026-11-20.