In this lesson
The AI answers only as well as the documents you give it.
You will learn to tidy the house before introducing the documents to the AI. It is the most boring job and the one that improves the result the most.
- Clean up and organize a folder of documents
- Decide what goes in and what stays out
- Separate who can see what
Garbage in, garbage out
If the folder has three versions of the same contract, the AI may answer with the old one. If it has a price list from 2022, it may quote the 2022 price. The AI does not know which one is right. You do.
Cleanup in four steps
- Delete duplicates and old versions. Keep them outside the collection.
- Use clear names. "customer-service-manual-2026.pdf" is better than "final2 (copy).pdf".
- Prefer real text. A PDF scanned as a picture needs text recognition first.
- Write the effective date at the top of the document.
What goes in and what stays out
| Goes in | Stays out |
|---|---|
| Manuals, policies, tables currently in force | Drafts and old versions |
| Frequently asked questions and contract templates | Personal conversations and stray emails |
| Step-by-step procedures | Passwords and access keys |
Start with a small, good collection. A hundred well-kept documents do more for you than a thousand messy ones.
Who can see what
Ask yourself: if an intern typed the question, could they open the file? If not, the file cannot be in a collection the intern has access to. Make one collection per group: customer service, finance, legal. Each with an owner, the person who keeps the content up to date.
Picture an accounting firm that put the payroll folder in its own collection, only for the HR department. General questions went into a collection open to everyone. Nobody had to switch the AI off to have peace of mind.
A simple maintenance routine
Documents change. Prices go up, a policy is revised, a procedure is replaced. Agree on a rule: when the document changes, the owner updates the collection the same day. Once a month, the owner checks that nothing old was left behind. Fifteen minutes a month keep the AI from stating a rule that no longer applies.
And record in one line what each collection contains, who the owner is and who can access it. That line helps when someone leaves the company or when you need to explain the system to an auditor.
An example of what goes wrong
Picture a company that put everything in a single folder: manuals, contracts and the salary spreadsheet. It works beautifully in the tests. The following week, a new employee asks "what is the manager's salary?" and the AI, which only wants to help, answers. Nobody acted in bad faith: the system simply did not know who could see what. The fix is to move the spreadsheet into a collection for the HR department.
That is why the rule is simple: think about permissions before uploading the first file, not after the first scare.
Questions for the collection owner
- Is this document in force today?
- Is there another version of it somewhere?
- Who can read this file today, apart from the AI?
- When was it last reviewed?
What the pros know
When you prepare documents for RAG, they become "fingerprints" stored in a database of their own. OWASP's security guide for AI warns: when different groups share the same database, passages from one group can be handed to another. It recommends databases that respect permissions and data separated by group. It also says attackers can reverse those fingerprints and recover part of the original text. Treat the database as if it were the document.
Practice · 12 min
- Choose a folder and delete the duplicates and old versions.
- Rename the files with clear names and note the effective date.
- Define the owner and the group that can access the collection.
Summary
- The AI is only as good as the documents.
- Clean up: duplicates, clear names, real text, effective date.
- Make one collection per group, each with an owner.
- Groups that share the same search database can see passages from one another.
Sources
Read on October 30, 2026.
- OWASP, LLM08:2025 Vector and Embedding Weaknesses: access control in vector databases, leakage between groups and embedding inversion.
Lesson quiz
Three situations to apply what you learned.
Isaque Victor free courses