AnswerGPT is a real-time, context-aware, hybrid chatbot powered by:
- 🧠 Phi-2 — A powerful, lightweight language model by Microsoft
- 📦 QLoRA Fine-Tuning — Trained on your own interactions
- 💾 Qdrant Vector DB — For memory storage and semantic search
- 🌐 DuckDuckGo Web Scraping — To pull live, real-world info
- 🎛️ Gradio Web UI — For a slick ChatGPT-style interface
✅ Fine-tuned local model (Phi-2 + QLoRA)
✅ Real-time web + memory hybrid answering
✅ Custom prompt formatting
✅ Add long-term memory via remember command
✅ Local Gradio UI
✅ Modular and hackable Python code
answergpt/
├── src/
│ ├── main.py # CLI chatbot
│ ├── model_loader.py # Load base + LoRA model
│ ├── prompts.py # Prompt formatting
│ ├── modules/
│ │ ├── vector_store.py # Qdrant memory interface
│ │ ├── web_search.py # DuckDuckGo scraping
│ │ └── answergpt-qlora/ # Fine-tuned LoRA model folder
├── gradio_ui.py # Web UI with Gradio
├── data/
│ └── log.jsonl # Chat logs for future training
├── models/ # [Optional] model artifacts
├── .gitignore
└── README.md
git clone https://github.com/AshrithChandan/Answer_GPT.git
cd answergptpython -m venv venv
venv\Scripts\activate # On Windowspip install -r requirements.txt✅ Or install manually:
pip install transformers peft qdrant-client sentence-transformers colorama gradio duckduckgo-searchmodels/answergpt-qlora/
This should contain:
adapter_model.safetensorsadapter_config.jsontokenizer_config.json, etc.
python -m src.mainpython gradio_ui.pyIt will launch in your browser at http://127.0.0.1:7860
- remember ... — Adds a fact to long-term vector memory (Qdrant)
You: remember Pluto is a dwarf planet- ask anything — Hybrid context-aware answer
You: What is Pluto?You can fine-tune Phi-2 with QLoRA using the built-in training pipeline on Colab. Just run:
src/modules/finetune_qlora.pyMake sure data/log.jsonl has high-quality Q&A logs.
You can fine-tune or run AnswerGPT directly in Colab:
This project is for educational & research purposes. You are responsible for compliance with licenses of pretrained models.
Feel free to reach out via GitHub Issues or contribute with a PR! Let's build the future of local AI together 🚀