Upload internal company documents and ask the chatbot detailed questions about them without sending any data to an external service.
Build a support chatbot that finds answers from a product manual using both exact keyword matching and semantic similarity for better accuracy.
Maintain separate knowledge bases so different teams can each chat with their own document collections independently.
Add conversation history so the chatbot remembers earlier messages in a session and can answer follow-up questions in context.
Requires running Milvus and PostgreSQL alongside the FastAPI backend, plus a separate npm step for the JavaScript frontend.
This is a chatbot system built for answering questions about documents you upload. Instead of relying on a language model's general training alone, it pulls relevant passages from a private document collection and feeds them into the model as context before generating a reply. This approach is called Retrieval-Augmented Generation, or RAG. The result is a chatbot that can answer detailed questions about your own files rather than recalling generic knowledge. The retrieval side uses two methods running together. The first is vector search, which finds documents by meaning and similarity using a database called Milvus. The second is BM25 search, an older text-matching technique that locates exact keyword matches. Results from both methods are combined using a ranking algorithm called Reciprocal Rank Fusion, then passed through a BGE reranker that reorders the final candidates by relevance before they reach the language model. Documents are uploaded through a web interface that handles chunking (splitting long documents into smaller pieces), generating embeddings (numerical representations of meaning), and storing everything in PostgreSQL and Milvus. The system supports multiple separate knowledge bases so you can keep different document collections distinct. Conversation history is preserved across turns so follow-up questions are answered with context from earlier in the chat. The backend is built with FastAPI and Python, using LangChain for some integration work. The frontend is a separate JavaScript application with a chat interface styled after ChatGPT, complete with message bubbles and a document upload sidebar. Starting it requires standard Python and npm setup commands run in sequence.
← pchengli on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.