Nobody can find what’s in your contracts. Here’s how an AI assistant over your own documents should work.
Your team answers the same questions all day, and the answers are buried in contracts, manuals and invoices. Why plain ChatGPT isn’t enough, and how I built an assistant that cites the exact sentence or says it doesn’t know.

Key takeaways
- An AI assistant over your documents answers questions from your own contracts, manuals and invoices, not from the internet, and shows where each answer came from.
- Plain ChatGPT isn’t enough for company documents: it can’t see your files, it doesn’t point to the page, and it will invent a convincing clause rather than admit it doesn’t know.
- A good assistant checks every quote against the real text before you see it, says “I can’t find this” when the files don’t support an answer, and hands the question to a person when it isn’t sure.
- Privacy is a design decision: each company’s data isolated in the database, IBANs, emails, phone numbers and tax codes masked before any external model call, and an EU-hosted model as an option.
- Before you build one, check four things: your documents are digital, someone owns the answers, you know the questions people ask, and you’ll test it on real questions before launch.
Someone in your office answers the same question three times before lunch. “How much notice do we need to cancel the cleaning contract?” “What are the payment terms with that supplier?” “Where’s the procedure for returns?”
The answers exist. They’re in a contract, a manual or an invoice, somewhere in a shared folder. Finding them means opening files one by one, so people ask the one colleague who remembers.
And sometimes nobody remembers. An auto-renewal clause with 60 days’ notice slips by, and the company pays for another year of a service it wanted to drop.
This post is for owners and managers of small and mid-sized companies with a lot of documents and no legal team. I’ll explain what an AI assistant over your own documents is, how it should behave, and what it costs to get one right.
What is an AI assistant over your own documents?
An AI assistant over your documents is a chat that answers questions using only your company’s own files, and shows you the page each answer came from. You ask in plain words. It finds the right passage in your contracts, manuals or invoices and answers from that passage.
The technique behind it is called RAG, retrieval-augmented generation. In one plain sentence: the system first searches your files for the passages that match the question, then asks the AI model to answer using only those passages.
That’s the whole idea. The model brings the language. Your documents bring the facts.
Why isn’t plain ChatGPT enough?
Because it doesn’t know your company, and it won’t tell you when it’s guessing. I use ChatGPT and Claude every day, and they’re excellent. For company documents they hit three walls:
- No access. It can’t see your files unless someone pastes them in. Most companies don’t want contracts and invoices pasted into a public chatbot, and they’re right.
- No citations. Even when it has the text, it gives you an answer without the page and sentence it came from. On a contract, an answer you can’t check is worth very little.
- Invented answers. Language models produce convincing quotes. Ask about a clause that doesn’t exist, and you may get one that sounds exactly like your contract.
In a product about contracts, one fake clause destroys trust.
Why can’t anyone find what’s in the documents?
Because business documents are written to be signed, not searched. The answer to “how much notice do we need” is usually one sentence on page one of a PDF, in legal wording nobody types into a search box.
Normal search has two blind spots. Keyword search misses the answer when the words differ: you type “cancel”, the contract says “notice of non-renewal”. AI search, which matches by meaning, has the opposite problem. It handles invoice numbers, IBANs, supplier names and clause numbers badly.
So in Sanad I run both in one database query and merge the results. That’s called hybrid search. On my test set, hybrid search put the right passage in the top three results for every answerable question.
How should a good document assistant behave?
It should be useful when it knows, honest when it doesn’t, and quick to call a person. Three rules I build every assistant around:
The model cites numbered sources. Before the answer reaches the screen, each quote is matched back against the real text. A quote that doesn’t match is dropped, and the confidence shown to the user goes down.
If nothing in your files supports an answer, the assistant says so. A blank answer costs a minute. A wrong one about a notice deadline can cost a year of fees.
When the assistant isn’t sure, the question goes to someone who can answer it. On an assistant for staff or customers, that handover is part of the design, not an afterthought.
There’s one more rule people forget: the documents themselves can attack you. A malicious instruction can hide inside an uploaded file, not only in the user’s question. Sanad scans the question and every retrieved passage for prompt injection, meaning text that tries to give the AI new orders, before it goes into the prompt.
How I built it in Sanad
Sanad is an AI assistant I built for small and mid-sized companies. It reads a company’s contracts and invoices, cites the exact sentence, and never acts without approval. The demo company is a fictional shoe maker in Civitanova Marche, with contracts, invoices and policies in English, Italian and Arabic.

You upload the documents once: PDF, Word or plain text. A background worker reads each file, splits it into passages, detects whether it’s a contract, invoice or policy, and extracts the terms that matter. Then you can ask in English, Italian or Arabic, and every citation opens the page with the quoted sentence highlighted.
I didn’t want to call it good on a feeling. Sanad is measured on 44 test questions every time the code changes, and the build fails if the scores drop below the thresholds:
Read those honestly. The scores come from the offline test setup, on sample documents, not from a real company. Saying “I don’t know” at 0.80 is good, not perfect. Sanad has no paying customers yet. The next step is a pilot with a real SME and the same tests on real contracts.


What about privacy?
Privacy isn’t a checkbox at the end. It’s how the system is built from the first table. In Sanad that means four things:
- Each company is isolated by the database. Row-level security, the database checking who may read each row, is on for every company table. If the company isn’t set on a request, queries return nothing.
- Sensitive values are masked. IBANs, emails, phone numbers and Italian tax codes are masked before any external model call, and restored in the answer.
- You choose where the model runs. The same code works offline, with OpenAI, with an EU-hosted OpenAI-compatible endpoint, or with Claude, switched with one setting.
- Everything is logged. Every model call is metered, and every human decision is written to an audit log with who decided and when.
The EU AI Act now applies too. For most internal document assistants the practical side is transparency and keeping a human in charge. I’m a developer, not a lawyer, so check your own case with yours.
What does it cost, and what can go wrong?
There are two kinds of cost: building it carefully once, and paying for model calls every day. The first is mostly checks and testing, not the chat window. The second you can measure. Here’s the honest list:
| Cost or risk | What it means | What I do about it |
|---|---|---|
| Building and testing | Most of the work is checks, isolation and a test set, not the chat window | Scope, timeline and price agreed in writing before work starts |
| Model usage | Every question, upload and extraction calls a model | Cost metered per company and per operation, so the expensive part is visible |
| Scanned PDFs | A photo of a page has no text to search | Sanad doesn’t read scans yet; OCR is on its roadmap |
| Lost citations | A correct answer that paraphrases can lose its quote | Lower confidence is shown, not hidden |
| Questions across languages | An Italian question about an English contract is harder | The test report lists these misses openly |
| New attack phrasings | Injection detection based on patterns needs upkeep | Blocked attempts are shown with the matched patterns, so gaps are visible |

If cost is your main worry, I wrote a separate post on keeping AI features affordable.
Is your company ready? A checklist
You don’t need to be a tech company. You need a few basics in place. Go through this list today:
- Your documents are digital. Text PDFs, Word files or plain text. If most of them are paper scans, that’s step zero.
- You know the top questions. Write down the twenty questions people ask most. They become the test set.
- Someone owns the answers. A person who decides what’s correct and takes the questions the assistant can’t answer.
- You know who sees what. Which documents are for everyone, and which only for management or accounting.
- You’ve decided where data may go. Any provider, EU-hosted only, or nothing leaving your servers.
- You’ll test before launch. On your real questions, including ones the documents can’t answer.
If you can tick four of six, you’re ready for a first version. If not, the list tells you what to fix first.
What to do next
Start with the questions, not the technology. Pick one folder, for example supplier contracts, and the ten questions people ask about it most.
If you want to see how the pieces fit, the Sanad case study shows every screen, the test results and the trade-offs. My services page explains how I build AI assistants for companies. If the next step is letting AI do things, not just answer, read how I hand work to an AI team without losing control.
I’m based in Macerata and work with companies across Italy and Europe. Tell me about your documents and the questions your team keeps answering, and I’ll reply with questions or a plan for a first call.
About the screenshots: every image comes from Sanad running on its demo company, a fictional shoe maker in the Marche, captured by the project’s own end-to-end script.
Questions people ask
What is an AI assistant over company documents?
Why can’t we just use ChatGPT for this?
How do you stop the assistant from inventing answers?
Is our data safe with an AI document assistant?
Can you build a document assistant for my company?





