Generative AI · Compliance
RAG for regulated industries: how to build a compliant AI knowledge assistant
Retrieval-augmented generation (RAG) lets a large language model answer from your own policies, contracts and regulations, citing the source of every answer. For banks, fintechs and law firms, the hard part isn't the model — it's permissions, data residency, evaluation and audit. This guide sets out a reference architecture and the GDPR, DORA and EU AI Act considerations that shape it.
Key takeaways
- RAG grounds a large language model in passages retrieved from a trusted knowledge base, so answers stay current and traceable to their sources.
- For regulated firms, permissions, data residency and audit logging matter more than the choice of model.
- Most internal knowledge assistants are not high-risk under the EU AI Act unless they are used for an Annex III purpose such as creditworthiness or employment decisions; Article 50 transparency applies from 2 August 2026.
- For financial entities, an AI vendor or model provider is an ICT third-party provider under DORA.
- Measure quality with a test set of real questions scored for faithfulness, citation accuracy and correct refusals — before and after launch.
What is retrieval-augmented generation?
Retrieval-augmented generation (RAG) is an architecture in which a large language model answers a question using passages retrieved from a trusted knowledge base, rather than relying only on what it learned during training. The technique was introduced by Lewis et al. in 2020 and has become the standard way to apply LLMs to private, fast-changing information.
A RAG system has two halves. Retrieval finds the most relevant passages for a question; generation writes an answer constrained to those passages and cites them. Improve either half and the answers improve.
Why do regulated firms prefer RAG to fine-tuning?
- Traceability. Every answer cites the passage it came from, so a compliance officer can check it.
- Currency. Updating knowledge means re-indexing documents, not retraining a model.
- Access control. Retrieval can enforce the same permissions as the source systems, so users only see answers drawn from documents they may read.
- Data minimization. Confidential data stays in a searchable index rather than being baked into model weights — and removing a document from the index removes it from future answers.
A reference architecture for a compliant RAG assistant
- 01Source registry. Each collection has an owner, a refresh schedule and an access policy.
- 02Permission-aware ingestion. Documents are parsed with their structure — headings, tables, clause numbers — and every chunk carries the access rights of its source.
- 03Hybrid retrieval and re-ranking. Keyword and vector search run together, and a re-ranker orders the best passages first.
- 04Query-time permission filter. Results are filtered against the user's rights before the model sees them.
- 05Grounded generation. The model answers only from retrieved passages, cites them, and declines when they don't contain the answer.
- 06Guardrails. Personal-data redaction where needed, defences against prompt injection hidden in documents, and topic boundaries.
- 07Audit logging. Questions, retrieved sources, answers and user feedback are logged for review.
- 08Evaluation and monitoring. A fixed test set is re-run on every change, and production quality is tracked continuously.
How do GDPR and data residency apply?
When documents contain personal data, GDPR applies to the RAG system like any other processing: you need a lawful basis, data minimization and appropriate security. A model provider processing data on your behalf needs a processor agreement under Article 28, and transfers outside the European Economic Area require a valid transfer mechanism under Chapter V.
In practice, regulated firms keep the index and the application inside their own cloud environment in an EU region, use enterprise model endpoints configured so prompts and documents are not used for training, or self-host open-weight models when data must never leave their infrastructure.
What does DORA require when an assistant uses third-party AI?
For banks, payment and e-money institutions, investment firms and other financial entities, DORA has applied since 17 January 2025. A cloud platform, a model API and an AI development partner are all ICT third-party service providers. Each contract must be recorded in the register of information, the provider must be assessed before contracting, and the contract must include the clauses set out in Articles 28–30, covering data location, access and return, audit, incident assistance and exit.
Concentration risk matters too. In November 2025 the European Supervisory Authorities designated the first 19 critical ICT third-party providers, including AWS, Google Cloud and Microsoft. An exit strategy — for example, the ability to swap the model behind the assistant — is part of a resilient design.
Is a RAG assistant high-risk under the EU AI Act?
Usually not. An internal assistant that answers staff questions from policies and procedures is not listed in Annex III. It becomes high-risk if it is used for an Annex III purpose — for example, evaluating the creditworthiness of individuals (point 5(b)) or making decisions about recruitment, promotion or termination of employees (point 4) — and those obligations apply from 2 December 2027.
Transparency obligations under Article 50 apply from 2 August 2026: people interacting with an AI system must be informed that they are doing so, unless it is obvious. For customer-facing assistants, that means a clear disclosure in the interface.
How do you measure whether a RAG assistant is accurate?
Build a test set of real questions with expert-approved answers before you build the assistant, and score every version against it:
| Metric | Question it answers |
|---|---|
| Retrieval recall | Did the right passage appear among the retrieved results? |
| Faithfulness (groundedness) | Is every claim in the answer supported by the retrieved passages? |
| Answer relevance | Does the answer address the question that was asked? |
| Citation accuracy | Do the citations point to the passages that support the claims? |
| Correct refusal rate | Does the assistant decline when the sources don't contain the answer? |
| Latency and cost | Is it fast and affordable enough for daily use? |
Building RAG in Greek and English
Organizations in Cyprus and Greece often hold records in both Greek and English. Multilingual embedding models let a question in one language retrieve passages written in the other, and the test set should include questions in both languages.
For self-hosted deployments, open Greek-language models are now available: Meltemi, released by the Institute for Language and Speech Processing (ILSP) of the Athena Research Center in 2024 as the first open Greek LLM, and Llama-Krikri, announced by ILSP in February 2025.
Common failure modes — and how to avoid them
- Stale index. Documents change but the index doesn't. Fix: scheduled re-indexing and a freshness date on every source.
- Broken tables and clauses. Naive chunking splits a table or a clause from its heading. Fix: structure-aware parsing.
- Permission leaks. The assistant answers from documents the user may not see. Fix: permissions on every chunk and filtering before generation.
- Over-confident answers. The model fills gaps from general knowledge. Fix: grounding instructions, citations and refusal tests.
- Prompt injection. A document contains instructions aimed at the model. Fix: treat retrieved text as data, and test with adversarial documents.
- No content owner. Nobody is accountable for source quality. Fix: name an owner for every collection.
Keap Technologies builds RAG and LLM applications for banks, fintechs and law firms in Cyprus, across the EU and in the US. Tell us about your use case.
Frequently asked questions
Does RAG eliminate hallucinations?
No, but it reduces them substantially. Grounding answers in retrieved passages, requiring citations, instructing the model to decline when sources are silent, and testing faithfulness on a fixed question set together make hallucinations rare and detectable.
Can we use RAG with confidential client data?
Yes, with the right architecture: keep the index and application in your own environment or an EU region, enforce document permissions at query time, use model endpoints that don't train on your data or self-host an open-weight model, and log every interaction.
Do we need a vector database for RAG?
You need vector search, but not necessarily a separate database. Many existing databases and search engines support vector indexes. The best retrieval quality usually comes from combining vector search with keyword search and re-ranking.
Is a RAG chatbot high-risk under the EU AI Act?
Usually not. A knowledge assistant is high-risk only if used for an Annex III purpose such as credit scoring of individuals or employment decisions. Article 50 transparency obligations apply from 2 August 2026 when people interact with it.
What do we need to start a RAG pilot?
A representative document collection, a list of real questions with expert-approved answers, and clarity on who may see which documents. With those, quality can be measured from the first iteration.
Sources
- [1]Lewis et al. (2020) — Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
- [2]Regulation (EU) 2024/1689 — Artificial Intelligence Act (EUR-Lex)
- [3]EU AI Act, Annex III — high-risk AI systems (readable copy)
- [4]Regulation (EU) 2026/1744 — Digital Omnibus on AI (EUR-Lex)
- [5]Regulation (EU) 2022/2554 — Digital Operational Resilience Act (EUR-Lex)
- [6]ESAs — List of designated critical ICT third-party providers (November 2025)
- [7]Regulation (EU) 2016/679 — General Data Protection Regulation (EUR-Lex)
- [8]Meltemi: the first open large language model for Greek (arXiv, 2024)
- [9]ILSP — Llama-Krikri-8B announcement (February 2025)
This article is general information, not legal advice. Check obligations for your firm with your compliance or legal adviser.
About the author
Panayiotis Kattides
Co-founder — GenAI & Data Science, Keap Technologies
Full-stack data scientist with deep expertise in fintech and blockchain. Passionate about building efficient, high-quality AI solutions that transform complex problems into scalable, real-world impact.
LinkedInprofile of Panayiotis Kattides (opens in a new tab)