An enterprise-grade, 100% air-gapped, and privacy-compliant Retrieval-Augmented Generation (RAG) system engineered for financial compliance auditing under EU regulatory frameworks (such as GDPR and the EU AI Act).
By utilizing entirely local open-source models, this system cuts out external third-party API dependencies—guaranteeing total data sovereignty and zero-data-leakage pipeline operations.
- Zero Cloud Data Leakage: Sensitive financial logs and audit trail vectors are maintained entirely on local disk files, ensuring full compliance with strict data protection laws.
- Hallucination Mitigation: Uses deterministic context-bounding filters and a forced
0.0model temperature matrix, cutting false facts and creative hallucinations down to zero. - Modular Software Design: Built using enterprise separation of concerns, isolating data ingestion workflows, custom vector searches, and LLM inference blocks.
graph TD
A[Raw Audit Documents .txt] -->|Token-Based Splitter| B(Data Embeddings)
B -->|nomic-embed-text:latest| C[(Local ChromaDB Filesystem)]
D[Incoming Audit Query Request] -->|Vector Semantic Mapping| C
C -->|Top-K Grounded Context Payload| E[Local Llama 3.2 Instance]
E -->|Strict Deterministic Prompt Constraint| F[Context-Grounded API Response]
- LLM Engine & Embeddings Layer: Ollama (
llama3.2:latest,nomic-embed-text:latest) - Orchestration Matrix: LangChain Core / Pydantic V2 Settings
- Persistent Vector Storage: ChromaDB (Localized SQLite backend engine)
- API Delivery Web Framework: FastAPI / Uvicorn Server
- CI/CD & Virtualization: GitHub Actions / Multi-stage production Dockerfile
Ensure you have Ollama installed locally on your host device and pull the required open-source models:
ollama pull nomic-embed-text:latest
ollama pull llama3.2:latestClone this repository and install the production-grade dependency tree:
git clone
cd FinSecure-Audit-Brain
pip install -r requirements.txtDrop your raw audit notes or financial regulatory summaries into the data/raw/ directory as .txt files, then trigger the token-chunking ingestion pipeline:
python -m src.ingestionSpin up your high-performance FastAPI orchestration backend instance:
uvicorn src.app:app --reload --port 8000Open your browser and navigate to http://127.0.0 to view and interact with the automatically generated API documentation interface.
curl -X POST "http://127.0.0" \
-H "Content-Type: application/json" \
-d '{"question": "What policies help prevent financial fraud?"}'This codebase implements test-driven engineering concepts. Run the automated testing suite locally using pytest:
pytest tests/ -v