Skip to content

Learning prototype project for a secure, observable RAG system

Notifications You must be signed in to change notification settings

go2bharadwaj/SentinelRAG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

SentinelRAG: Private, Secure T&C and Contract QA Assistant (Discovery/Learning Prototype)

Overview

SentinelRAG is a self-hosted prototype designed to help you make sense of the legal documents youโ€™ve signed โ€” from Terms & Conditions and NDAs to privacy policies and contracts โ€” simply by asking questions in plain English.

๐Ÿ’ก The idea for this project was inspired by a real experience:

When I bought a home, I had to sign a large number of legal documents for the first time โ€” and it made me realize how little visibility I had into what I was actually agreeing to. That experience sparked the idea for a system that would let anyone securely upload their own contracts and later ask meaningful questions about them โ€” without needing to dig through legal jargon.

๐Ÿ” What SentinelRAG does

SentinelRAG lets you:

  • Upload contracts, policies, or agreements
  • Ask natural-language questions like:
    • โ€œCan they share my data?โ€
    • โ€œAm I locked into a renewal?โ€
    • โ€œWho owns the intellectual property?โ€
  • Receive fast, relevant answers that help you understand what youโ€™ve agreed to โ€” without reading every clause manually.

๐Ÿ” Why it matters

Legal documents shouldnโ€™t be a black box. SentinelRAG aims to bring clarity, security, and control to your agreements, powered by Retrieval-Augmented Generation (RAG) and wrapped in best practices for DevOps and AI infrastructure.

This is an ongoing learning prototype โ€” built to explore how GenAI, when combined with secure infrastructure, can make legal understanding more human-friendly and trustworthy.

Key Practices Demonstrated

  • TLS/mTLS encryption and hardened Docker containers
  • Observability via Galileo GenAI SDK (or Prometheus + Grafana fallback)
  • Kubernetes-based CI/CD with Helm and GitHub Actions
  • Modular, API-first design using FastAPI and LangChain
  • Uses hardened infrastructure to keep sensitive data protected

๐Ÿ›ก๏ธ This is a prototype, not yet intended for production use. It is being developed to explore infrastructure, security, and reliability practices relevant to secure GenAI systems.

Stack

  • Backend: Python, FastAPI, LangChain
  • Retrieval: FAISS (persistent disk storage) (For now)
  • Embeddings: HuggingFace (MiniLM-L6-v2)
  • LLM: Mistral via Ollama (local inference using Ollama)
  • Security: SHA256 deduplication, TLS/mTLS planned
  • Deployment: Docker โ†’ K8s (via Helm)
  • Observability: Galileo SDK (planned) or Prometheus + Grafana (fallback)
  • DevOps: GitHub Actions (planned)

Status

  • First commit: June 7, 2025
  • MVP target: June 12, 2025
  • Actively being developed โ€” structure and pipeline under construction

Planned Structure

SentinelRAG/ SentinelRAG/

  • backend/ # FastAPI app + LangChain pipeline
    • main.py # REST API (upload, ask, delete vectordb)
    • rag_pipeline.py
    • requirements.txt
  • vectorstores/ # Persistent FAISS index + hash DB
  • security/ # TLS, hardening configs (planned)
  • k8s/ # Helm charts and manifests (planned)
  • observability/ # Monitoring and tracing setup (planned)
  • frontend/ # Streamlit UI (optional)
  • README.md

UPDATES:

  • Omitting security, untill the end

About

Learning prototype project for a secure, observable RAG system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published