System design
DHARMA separates presentation, API, and RAG core — with intent routing, metadata lookup, hybrid retrieval, and multi-turn memory.
User
Next.js
FastAPI
Intent + Metadata
Hybrid Retrieval
Groq LLM
Response
Browser
Next.js · Markdown · Sessions
API
FastAPI · Pydantic
Pipeline
Intent · Retriever · Memory
Database
PostgreSQL · pgvector
From browser click to cited, structured wisdom response.
App Router frontend with TypeScript, Tailwind CSS, Markdown rendering, related-question chips, and multi-turn session handling.
REST layer exposing health, readiness, chat (with session_id), corpus stats, and evaluation summary. Thin wrapper over the RAG pipeline.
VedicWisdomPipeline: query preprocessing, intent routing, metadata lookup, hybrid retrieval with reranking, conversation memory, and Groq generation.
867 verses with 384-dimensional BGE embeddings (bge-small-en-v1.5). IVFFlat index for approximate nearest-neighbor search.