AI · RAG
A RAG chatbot that only answers from documents your role may see
Natural-language questions across Finance, HR, Marketing and Engineering documents, answered with citations, with role-based access enforced in the retriever so each of six roles only sees what it is permitted to.
- Personal project
- 2026
- Designer and developer
- Python · FastAPI · LangChain · ChromaDB · SentenceTransformers · Mistral 7B · Streamlit
6
ROLES
From employee to C-level, each with its own document access
4
DEPARTMENTS
Finance, HR, Marketing and Engineering documents
One chatbot, different permissions
Company documents span Finance, HR, Marketing and Engineering, and not everyone may read all of them. The chatbot had to answer natural-language questions across all of it, cite its sources, and never surface a document the person asking is not allowed to see.
Access control in the retriever
Permissions are enforced where retrieval happens, not after the answer is written: metadata filtering in the LangChain retrievers means each of six roles, from employee to C-level, only retrieves the documents it is permitted to see.
The stack
- FastAPI backend with authenticated REST endpoints, batched document ingestion and logging
- ChromaDB vector store with SentenceTransformers embeddings
- Mistral 7B through the Hugging Face Inference API for answers that cite their sources
- A Streamlit chat interface on top