← all projects

argent-rag

Production-ready bilingual RAG backend — FastAPI + ChromaDB + MongoDB + Gemini. Language-detecting retrieval, grounded generation, multimodal image queries.

View on GitHub ↗Pythonupdated today

PythonFastAPIChromaDBGemini

High-level design

A retrieval-augmented generation service that detects Hindi/English, retrieves from the matching vector collection, and grounds a Gemini response in the retrieved docs — never letting the model answer from memory.

ingestion

FAQ chunking + embedding (Gemini embeddings) into per-language ChromaDB collections

retrieval

relevance search scoped to the detected language

generation

Gemini Flash 2.0, grounded in retrieved context; multimodal image path

language detection

routes a query to the correct collection, so Hindi never pulls English context

Low-level design

The pipeline is a straight line — detect → retrieve → generate — with each stage independently swappable.

  • Language detection runs first and scopes retrieval, so cross-language contamination is impossible
  • Generation is always grounded in retrieved docs; the model is not trusted to answer from pretraining
  • JWT-auth'd endpoints, MongoDB-backed config, deployed as a multi-stage Docker image