An AI Assistant That Answers From Your Own Documents: How RAG Really Works
Founder
Guide12 min read
What the drawing shows
- The questionA guest or a member of staff asks in their own words.
- The passages that matterThe system finds the parts of your documents that answer it.
- The answerIt is written from those parts only, not from the model's memory.
- The sourcesEvery answer shows which document and page it came from.
A generic chatbot does not know your cancellation policy, your contracts or your price list, so it guesses. RAG makes an assistant look things up in your own documents first and show where each answer came from. Here is how it works, where it fails and what it costs.
Key takeaways
- RAG means retrieve, then generate: the assistant first finds the relevant passages in your documents, then writes an answer only from them, with citations.
- Most of the quality comes from the unglamorous parts: clean, current documents, sensible chunking, hybrid keyword and vector search, and reranking.
- Greek adds real pitfalls: accents, final sigma, inflected words, Greeklish and mixed Greek and English files. Test with your own questions, not a vendor demo.
- Filter by permissions before the model sees anything, tell customers they are talking to AI, and measure retrieval and faithfulness on a test set before going live.
On this page
- RAG in plain words, and why it beats “just ask ChatGPT”
- When you don't need RAG
- How a RAG assistant works, step by step
- Greek-specific pitfalls
- Permissions: people should only retrieve what they may see
- Keeping the documents fresh
- When it goes wrong: symptoms, causes and fixes
- How to know it works: testing before and after launch
- Getting started: a practical checklist
- GDPR, the AI Act and who is responsible
- What a RAG assistant costs
- How Orya One can help
Retrieval-augmented generation (RAG) is how you get an AI assistant to answer from your own documents rather than from memory. When someone asks a question, the system first retrieves the few passages in your manuals, contracts, policies or price lists most likely to hold the answer. Then a language model generates a short reply using only those passages, with a citation for each claim. If nothing relevant turns up, a well-built assistant says it does not know.
The hard work is not the AI model. It is getting the right documents in, finding the right passage among thousands, making sure each person only retrieves what they are allowed to see, and checking that answers stay correct as documents change.
This guide is for owners and managers of Greek small and medium businesses, such as hotels, clinics, accounting and law offices and manufacturers, who are considering an assistant for staff or customers. For the wider picture, start with where AI actually pays off for small businesses.
RAG in plain words, and why it beats “just ask ChatGPT”
Think of an open-book exam. A general chatbot answers from its training: a vast amount of public text, but nothing about your 2026 cancellation terms or your supplier contract. Ask it anyway and you often get a fluent, confident and wrong answer. RAG gives the model the book, opens it at the right page and tells it to answer from that page. The term comes from a 2020 research paper by Lewis and colleagues (Lewis et al.).
The business owns what its assistant says. In 2024, British Columbia's Civil Resolution Tribunal ordered Air Canada to compensate a passenger after its website chatbot wrongly told him he could apply for a bereavement fare after travelling. The tribunal rejected the airline's argument that it could not be held liable for information from its chatbot (Global News). An answer that reads well is not necessarily right, the same trap we described for AI-written code. Citations let people check.
When you don't need RAG
We will tell you if you don't need this. Skip RAG when:
- Your documents are few. Anthropic notes that a knowledge base under about 200,000 tokens, roughly 500 pages, can go straight into the model's prompt (Anthropic). A 40-page procedures manual can simply be uploaded to a business AI plan. Claude Projects, for example, switches to retrieval on its own when project knowledge nears the context limit (Claude Help Center). Our Orya AI service sets this up for offices.
- The question is about numbers. “How many room nights did we sell in August?” belongs to your PMS or accounting system, answered with SQL or a KPI dashboard. RAG retrieves text. It does not add up tables reliably.
- The answer changes by the minute. Availability, stock and order status need a live lookup in the system that holds them, not yesterday's documents.
- The knowledge is only in people's heads. There is nothing to retrieve until someone writes it down.
Even when everything fits, a long prompt has costs. Models use information less reliably when it sits in the middle of a long context (Liu et al.), and every page is paid for on every question.
How a RAG assistant works, step by step
1. Collect and clean the documents
List the sources: policies, contracts, manuals, price lists, FAQs, past email answers. Remove duplicates and superseded versions, or the assistant will sometimes quote last year's price list. Scanned PDFs need text recognition first (see AI invoice and document processing). Label each document with its owner, its date and who may see it. Those labels drive permissions and freshness later.
2. Split them into chunks
Documents are cut into passages of a few paragraphs, so that search returns the clause about cancellations, not a 60-page contract. Good chunking follows headings, keeps tables and clauses whole and adds the document title and section to each chunk. Anthropic reported that adding a little document context to each chunk cut retrieval failures by 35% in its tests (Anthropic).
3. Embeddings: search by meaning
An embedding model turns each chunk, and each question, into a list of numbers that captures its meaning. The system returns the chunks closest to the question. That is why “can I get my money back?” can find a passage titled “Refund policy” without sharing a single word with it.
4. Keyword search: hybrid retrieval
Search by meaning is weak on exact strings: product codes, contract numbers, a supplier's name. Classic keyword ranking, known as BM25, is strong there. Anthropic's example is an error code that embeddings may miss and keyword search finds directly (Anthropic). Run both and merge the results. In the same tests, contextual embeddings combined with keyword search cut retrieval failures by 49%.
5. Rerank the shortlist
A reranker reads the question together with each of the top 20 to 50 candidates and keeps the best handful. With reranking added, Anthropic's failure rate fell from 5.7% of queries to 1.9%, a 67% reduction (Anthropic). Your numbers will differ, but the lesson holds: the gains are in retrieval, before the model writes a word.
6. Answer with citations, or say “I don't know”
The model receives the question, the top passages and strict instructions: answer only from these passages, cite each statement, and if the answer is not there, say so and offer a human. Citations such as “[1] Cancellation policy, p. 4” link to the original document. For a customer-facing assistant, a polite handover to reception is far cheaper than a confident wrong answer about refunds.
Greek-specific pitfalls
- Accents, capitals and final sigma. “κράτηση”, “κρατηση” and “ΚΡΑΤΗΣΗ” should match, and so should “ς” and “σ”. Elasticsearch, for instance, ships a Greek analyser with Greek lower-casing, stop words and stemming (Elastic), and the underlying Lucene filter removes some Greek diacritics and standardises final sigma (Apache Lucene). A default English set-up does neither.
- Inflection. “τιμολόγιο”, “τιμολογίου” and “τιμολόγια” are one word to a person and three to a naive keyword index. Stemming helps, and embeddings help more.
- Mixed Greek and English. A Greek question must be able to find an English contract clause, which needs a multilingual embedding model. BGE-M3, for example, states support for more than 100 languages (Hugging Face), but “supported” does not mean equally good in each. Test with your own Greek questions.
- Greeklish. “pos kanw akyrwsh” defeats keyword search and some embedding models. Put Greeklish questions in your test set.
- Token cost. The same content can need far more tokens in some languages than in English, up to 15 times more in one study (Petrov et al.). Expect Greek to cost more per page than English, and measure it on your own documents.
Permissions: people should only retrieve what they may see
In a staff assistant, the main risk is not the AI inventing things. It is the AI faithfully quoting a document the person asking should never see: salaries, a client's tax file, a patient's notes. OWASP's first recommended defence is fine-grained access control with permission-aware vector stores (OWASP). In practice:
- Filter by permission at retrieval time, before any text reaches the model. “Do not reveal salaries” in a prompt is not access control.
- Mirror the permissions of your shared drive: chunks from the partners' folder can be retrieved only by partners.
- Give a customer-facing assistant its own index containing only public documents, so nothing private can leak whatever a visitor types.
- In accounting and law offices, scope retrieval to one client file at a time. In clinics, keep patient records out of a reception assistant entirely.
Keeping the documents fresh
An assistant is only as current as its index: a perfect model reading last year's price list gives last year's price. Give every document an owner. Sync automatically from the shared drive or SharePoint folder, so a new version replaces the old one within hours. Show the document date in each citation, put review dates on seasonal material such as summer prices, and when a document is deleted, delete its chunks too.
When it goes wrong: symptoms, causes and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
| Confident answer that is wrong | Weak passages retrieved; the model filled the gap | Answer only from sources; “I don't know” when retrieval scores are low |
| Quotes last year's price or policy | Old versions still in the index | Remove superseded files, sync on change, show dates in citations |
| Misses codes, numbers or names | Vector search only | Add keyword (BM25) search and merge the results |
| Fails without accents or in Greeklish | English text analysis, weak multilingual embeddings | Greek-aware analyser; test embedding models on Greek questions |
| Right document, wrong part of it | Chunks too large or cut mid-clause | Chunk by headings and clauses; add title and section to each chunk |
| Staff see content they should not | Permissions in the prompt, not at retrieval | Permission-aware retrieval and a separate public index |
| Wrong answers to “how many” questions | RAG used for structured data | Send those questions to the database or a dashboard |
How to know it works: testing before and after launch
Our guide to AI for small businesses covers the general method: a test set, a baseline and a threshold agreed before launch. For RAG, measure three things separately, because each points to a different fix:
- Retrieval hit rate: how often the passage holding the answer appears in the top five results. If retrieval misses, no model can answer correctly.
- Faithfulness: the share of claims in an answer that the retrieved passages actually support, on a scale from 0 to 1, as the open-source Ragas library defines it (Ragas).
- Correct refusals: how often questions your documents cannot answer get “I don't know”.
Build the set from 50 to 100 real, anonymised questions taken from emails, front-desk notes or phone calls, each tagged with the document and page that answers it. Re-run it after every change to documents, chunking, models or prompts. Our open-source orya-eval does exactly this: it compares each run against a baseline and fails when a metric drops below your threshold.
A worked example (illustrative)
Take a hypothetical 30-room hotel near Paralia with 80 test questions: 70 that its documents can answer and 10 that they cannot. The numbers are illustrative, not from a real client. With vector search alone, the right passage is in the top five for 58 of the 70 answerable questions, a hit rate of 82.9%. Adding keyword search and a reranker raises that to 66 of 70, or 94.3%. At first the assistant correctly declines 7 of the 10 unanswerable questions; after the instructions are tightened, 9 of 10. The team agreed to go live only above a 90% hit rate, 0.9 faithfulness and 9 correct refusals out of 10, so it can launch, and it re-checks the same 80 questions every month.
Getting started: a practical checklist
- Pick one audience and one job, such as front-desk staff answering guest questions. Not staff and customers at once.
- Collect 50 to 100 real questions and find each answer in your documents yourself. If you cannot, the assistant will not either.
- Clean the documents: remove old versions, assign owners, label who may see what.
- Choose the data route: a cloud provider with a data processing agreement and EU hosting, or a local open-weight model for sensitive material.
- Build a pilot with hybrid search, reranking, citations and “I don't know” from day one.
- Measure it against the test set and agree go-live thresholds in writing.
- Run it in shadow mode for two to four weeks, with staff using the good answers and flagging the wrong ones.
- Go live with an AI notice and a route to a human, and re-run the test set every month.
GDPR, the AI Act and who is responsible
Tell people they are talking to AI. Under Article 50(1) of the EU AI Act, AI systems intended to interact directly with people must be designed so that those people are informed they are interacting with an AI system, unless that is obvious to a reasonably well-informed person; Article 50(5) requires this at the latest at the first interaction (AI Act Service Desk). The European Commission says these transparency rules apply from 2 August 2026, so chatbots have to tell users they are dealing with AI, not a human (European Commission). The formal duty falls on the provider of the system, but a line such as “You are chatting with an AI assistant” costs nothing. Parts of the AI Act's timeline have moved before, so check the current position with your lawyer.
Personal data in your documents means GDPR applies. Indexing contracts, emails or client files that contain personal data is processing (GDPR on EUR-Lex). Minimise (Article 5(1)(c)): index the policy, not the folder of signed guest forms. An outside AI or hosting provider processing data for you needs a contract under Article 28, normally a data processing agreement, and Article 32 asks for security appropriate to the risk: access control, encryption, logs. Health data is a special category under Article 9, so clinics need extra care and may need a data protection impact assessment; ask your DPO. When someone's data must be erased, remember the index and the question logs, not only the original file.
For the most sensitive material, open-weight models can run on your own server, so documents and questions never leave the building. The trade-offs are covered in our guide to local LLMs and GDPR.
What a RAG assistant costs
Running costs are usually small. Take an illustrative accounting office with about 3,000 pages, roughly 1.2 million tokens using Anthropic's rule of thumb of 500 pages per 200,000 tokens. Embedding them with OpenAI's text-embedding-3-small, listed at $0.02 per million tokens (OpenAI), costs about two cents. Each question then sends about 3,000 tokens to the answering model (question, instructions and six passages) and gets about 300 back. The answering-model prices below are assumptions; check your provider's current list.
| Item (illustrative) | Assumption | Cost |
|---|---|---|
| Indexing 3,000 pages once | 1.2 million tokens at $0.02 per million | About $0.02 |
| One question | 3,000 tokens in at €3 per million, 300 out at €15 per million | About €0.014 |
| One month of use | 40 questions a day, 22 working days (880 questions) | About €12 |
| Same month in Greek | Assume Greek doubles the token count | About €24 |
| Hosting the index and app | A small cloud server or managed database | Tens of euros a month |
The bigger costs are one-off and human: cleaning and labelling documents, building the pipeline with permissions, writing the test set and reviewing answers in the first weeks. A pilot on a clean document set is weeks of work, not months. An AI assistant that answers from your documents is available as an add-on to our Data and ML packages, which start from €1,200 (Insight), €3,500 (Automation) and €9,000 (ML system). Every project gets a fixed written quote.
How Orya One can help
At Orya One we build data and machine learning systems and custom software for businesses across Greece, and set up business AI tools for offices through Orya AI. You talk directly to the person who writes the code. We start with your questions and documents, not with a model, and we will tell you if an off-the-shelf AI plan, a better search or a dashboard is the right answer instead. When we build an assistant, it comes with citations, permission-aware retrieval, a test set tracked with orya-eval, GDPR by design and full ownership of the code.
In healthcare, we built the website for Medixplain, a healthcare explainable-AI brand. The same principle runs through every assistant we build: each answer should show where it came from.
If you are considering an assistant for your staff or customers, send us ten real questions people ask you and a list of the documents that hold the answers. We will tell you honestly whether RAG is worth it, or whether something simpler will do.
About the author
Dimitris Kampouridis · Founder, Orya One
Dimitris Kampouridis founded Orya One in 2026 in Paralia Katerinis, Pieria. He is a computer scientist and data scientist, with a BSc (University of Sheffield) and an MSc (University of York), and writes the code of every project himself.
More about Orya OneFrequently asked questions
What is RAG in simple terms?
Retrieval-augmented generation is a way of making an AI assistant answer from your own documents. When a question comes in, the system searches your documents for the most relevant passages, then a language model writes a short answer using only those passages and cites where each statement came from. If the documents do not contain the answer, a well-built assistant says it does not know.
Why not just upload our documents to ChatGPT or Claude?
For a small set of documents, that is often the right answer. Anthropic notes that a knowledge base under about 200,000 tokens, roughly 500 pages, can go straight into the prompt, and business AI plans make this easy. A custom RAG assistant becomes worth it when you have many documents, need each person to see only what they are allowed to, want it in front of customers on your website, or need citations, automatic updates and measured accuracy.
Does a RAG assistant work well in Greek?
It can, but test it. Keyword search needs a Greek-aware analyser so that accents, capitals and final sigma do not break matches, and the embedding model must handle Greek as well as any English documents you have. Greeklish questions and inflected words are common failure points. Build a test set from real Greek questions and measure retrieval before choosing models.
How much does an assistant for our documents cost to run?
Running costs are usually modest. In our illustrative example, an office with 3,000 pages of documents and 880 questions a month spends roughly €12 to €24 a month on model usage, plus hosting, depending on the assumed prices and the extra tokens Greek needs. The main costs are the build, cleaning the documents and ongoing review. At Orya One, the AI assistant is an add-on to our Data and ML packages, which start from €1,200, with a fixed written quote.
Do we have to tell customers they are talking to an AI?
Generally, yes. Article 50 of the EU AI Act requires AI systems that interact directly with people to inform them that they are dealing with AI, unless it is obvious, at the latest at the first interaction. The European Commission says these transparency rules apply from 2 August 2026. A short notice at the start of the chat is simple to add. This is general information, not legal advice, so check your own case with a lawyer.
