📄 README.md markdown Copy Edit
A secure, role-aware AI assistant built for FinSolve Technologies. This chatbot integrates Retrieval-Augmented Generation (RAG) with role-based access control (RBAC) to deliver accurate, context-specific answers—only to authorized users.
- Strict Role-Based Access: Fine-grained access to content by department (Finance, HR, Engineering, Marketing, C-Level, Employee).
- RAG-Powered Responses: Combines semantic search with large language models for accurate, source-grounded replies.
- Custom Document Ingestion: Supports both Markdown and CSV formats.
- Persistent Vector Store: Efficient and fast retrieval using ChromaDB.
- Multi-Model Support: Easily configurable with OpenRouter, DeepSeek, Mistral, and others.
- Intuitive UI: Clean, web-based frontend built with Streamlit.
Layer | Technology |
---|---|
Frontend | Streamlit |
Backend | FastAPI |
Vector Store | ChromaDB |
Embeddings | SentenceTransformers (all-MiniLM-L6-v2 ) |
LLM | OpenRouter / DeepSeek (via API key) |
Storage | Local persistence (chroma_db_data/ ) |
git clone https://github.com/PUndead/RAG-based-role-based-access-control-system-for-the-chatbot.git
pip install -r requirements.txt
Create a .env
file in the root directory with your API key
API_KEY=your-api-key-here
python role specific files.py
In new terminal run
uvicorn main:app --reload
In new Terminal run
streamlit run app.py
├── app.py # Streamlit interface
├── main.py # FastAPI backend logic
├── rag_engine.py # ChromaDB + embeddings + querying
├── role_based_ingest.py # Role-specific document loader
├── requirements.txt # All Python dependencies
├── .env # API credentials
├── chroma_db_data/ # ChromaDB persistent directory
├── data/ # Markdown and CSV document sources
└── README.md
Each role receives only the data it is authorized to access:
employee
finance
hr
engineering
marketing
c-level
All non-employee roles also have access to employee documentation.
This project is licensed under the MIT License.
We welcome contributions to improve features, performance, and security. Please fork the repository and open a pull request with your changes.
For internal deployments, support, or LLM key provisioning, please contact the FinSolve Engineering Team.
yaml Copy Edit