Skip to content

Latest commit

 

History

History
97 lines (76 loc) · 3.46 KB

File metadata and controls

97 lines (76 loc) · 3.46 KB

AI Knowledge Assistant

An enterprise-grade, microservices-based Retrieval-Augmented Generation (RAG) platform.

This system allows internal teams to securely upload, process, and interact with corporate documents (PDFs, Word, Excel, Images) using Large Language Models. It is built for scale, utilizing asynchronous document processing, vector search, and a decoupled microservices architecture.

🚀 Core Features

  • Multi-Modal Document Ingestion: Automated text extraction and parsing for PDFs, DOCX, XLSX (extensible for other file types).
  • Asynchronous Processing Pipeline: Event-driven document chunking and vector embedding via message queues to handle massive uploads without blocking the API.
  • High-Performance Retrieval: Semantic search powered by pgvector, with a Redis caching layer for sub-second retrieval of frequent queries and session histories.
  • Cloud-Native & Scalable: Fully containerized microservices designed for horizontal scaling, auto-recovery, and deployment on Kubernetes.

🏗️ System Architecture

The platform operates on a decoupled architecture, communicating synchronously via REST APIs and asynchronously via Message Brokers.

                  [ React Client ]
                         │
                 [ API Gateway ]
                         │
        ┌────────────────┴────────────────┐
        ▼                                 ▼
 [ Auth Service ]                  [ Chat Service ] <──> [ Redis Cache ]
 (JWT / RBAC)                             │
                                          ▼
                              [ AI Gateway Service ] ──> [ OpenAI / Ollama ]
                                          │
                                          ▼
                               [ Embedding Service ]
                                          │
                                          ▼
                       [ PostgreSQL (with pgvector) ]
                                          ▲
                                          │
                                     [ Worker ]
                                          ▲
                                          │
                            [ Message Queue (Kafka) ]
                                          ▲
                                          │
                            [ Document Processing ]
                                          ▲
                                          │
                               [ S3 / MinIO Storage ]

Technology Stack

Backend:

  • Python, FastAPI, AlchemySQL, REST APIs

Frontend:

-React, Vite, TailwindCSS, Shadcn

Databases:

  • PostgreSQL, Alembic,pgvector

Deployment:

-Git, Docker, Kubernetes

Planned Microservices

The platform is designed as a collection of independently deployable services.

Gateway Service
│
├── Authentication Service
├── Document Service
├── Chat Service
├── Embedding Service
├── Notification Service
└── Worker Service

Each service owns its own responsibilities and communicates using APIs and asynchronous messaging.


Future Improvements

  • Multi-tenant architecture
  • Streaming AI responses
  • WebSocket support
  • API Gateway rate limiting
  • Distributed tracing
  • Secrets management
  • Infrastructure as Code (Terraform)
  • Multi-cloud deployment
  • Automated scaling
  • Blue/Green deployments
  • Canary releases