💡 Blog Guide: How This Chatbot is Built
The RAGent Chatbot is a smart, modular, and explainable AI assistant that combines Retrieval-Augmented Generation (RAG) with ReAct-style agent reasoning. It goes beyond document Q&A — deciding when to read, when to think, and when to act using tools like web search, Wikipedia, calculator, and more.
- 📄 Answer questions from uploaded documents (PDF, DOCX, PPTX, XLSX, TXT, CSV, JSON)
- 🛠️ Use external tools dynamically — web search, weather, Wikipedia, calculator, etc.
- 🔍 Combine semantic and keyword search using hybrid retrieval
- 🧠 Think step-by-step using the ReAct agent framework
- 💬 Maintain chat context using memory for natural multi-turn conversations
- 🤖 ReAct Agent: Reasoning + tool calling in a loop: Thought → Action → Observation → Final Answer
- 📚 RAG Pipeline: Retrieves relevant chunks from Qdrant DB and answers with Gemini LLM
- 🛠️ Custom Tooling: Extensible tool framework (BaseTool) with weather, web, wiki, calculator, LLM, etc.
- 💾 Memory: Per-session chat history powered by MemoryManager
- 🖥️ Gradio UI: Intuitive chat + upload interface
| Layer | Technology |
|---|---|
| 🧠 LLM | Google Gemini via LangChain |
| 📦 Embeddings | BAAI/bge-base-en-v1.5 |
| 🔍 Vector DB | Qdrant (supports hybrid search) |
| 💬 UI | Gradio |
| 🧰 Tools | Tavily API, OpenWeather, Wikipedia, Calculator |
Try the RAGent Chatbot in your browser and upload your own documents:
- 🤗 Hugging Face App: Try it Live
- 🗃️ "What is the IT budget for 2023?" → Answer from your document using rag_search
- 🌦️ "What’s the weather in Tokyo today?" → Uses weather tool via OpenWeather API
- 📚 "What is quantum computing?" → Searches Wikipedia
- ➗ "What’s 245 * 92?" → Invokes calculator
- ✍️ "Summarize the benefits of LangChain" → Falls back to llm_instruction tool
- 📂 Upload documents → Processed & chunked with overlapping windows
- 📦 Store chunks → Embedded using BAAI and stored in Qdrant with tokenized keywords
- 💬 Ask a question → ReAct agent decides whether to use:
- rag_search for document-based answers
- tools like web_search, wikipedia, calculator, weather
- or fallback to Gemini via llm_instruction
- 🔄 Responds intelligently → Step-by-step reasoning with full transparency
- 🧠 Context retained → Chat memory keeps track of all past Q&A
📘 Dive deeper into the design, code, and reasoning logic in our full blog post:
This guide walks you through the architecture, ReAct prompts, tool integration, and Qdrant-based hybrid search — everything from concept to deployment.