Skip to content
AI · RAG2026

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.

Client
Personal project
Year
2026
Role
Designer and developer
Stack
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

01 · Discover

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.

02 · Architect

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.

03 · Build

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
Next case study

talentsear.ch, x-ray search for recruiters