AI Deploy Network
ChatbotCross-Industry / Horizontal 11/6/2026

RAG assistant with hybrid search and cross-chat memory (LangChain + ChromaDB)

Document Q&A web app in Python: upload PDF, DOCX, TXT, Markdown or CSV files, then chat with cited answers. Hybrid retrieval (HNSW vector search plus BM25) with a two-tier memory system.

Hours Automated
0
Cost Savings
Currency not specified
Revenue Impact
Currency not specified

Business Challenge

Plain chat over documents gives ungrounded answers and forgets earlier conversations. I wanted an assistant whose answers are traceable to source chunks, that keeps multi-turn context within a chat, and that can recall relevant past chats without re-uploading or re-explaining.

Solution Delivered

Built a FastAPI and LangChain application using GPT-4o-mini and text-embedding-3-small. Documents are chunked and stored in ChromaDB (HNSW, cosine) with a BM25 index; a LangChain EnsembleRetriever combines both for higher recall. In-chat memory keeps the last 20 user/assistant turn pairs per session, persisted to disk. Cross-chat memory: when a session is archived or deleted, the LLM writes a 200-400 word summary that is embedded into a separate Chroma collection; the top 3 most similar past summaries are injected into later prompts. Answers carry inline [Source: file, Chunk: N] citations and a References list. Documents can be marked globally shared across chats. Session management via REST API, single-page UI with no build step, retrieval weights and chunking configurable through .env. Personal open-source project, not a client engagement.

Outcomes Achieved

Working end-to-end application with a documented REST API and UI: grounded answers with per-chunk source citations, multi-turn context within a session, and continuity across archived sessions. Repository: github.com/muzammil5539/Agentic-AI-and-RAG-Projects (projects/beginner/rag-langchain-chroma). No external users or production client use is claimed.

Measurable Business Outcome

Every answer cites its source chunks. In-chat memory holds 40 messages per session; cross-chat memory retrieves the top 3 relevant past-session summaries per query.