An intelligent question-answering chatbot powered by LangChain and HuggingFace embeddings for AI-related queries.
- Semantic Search: Uses sentence transformers for accurate answer retrieval
- Dual Interface: Both Streamlit and Flask implementations
- Cosine Similarity: Finds most relevant answers from knowledge base
- Real-time Responses: Instant answers to AI-related questions
- Extensible Knowledge Base: Easy to add new documents
- Top-K Results: Returns multiple relevant answers with confidence scores
- Python 3.x
- LangChain - LLM framework
- HuggingFace Transformers - Sentence embeddings
- Streamlit - Interactive web UI
- Flask - REST API backend
- Scikit-learn - Similarity calculations
git clone https://github.com/vageeshgos/langchain_projects.git
cd langchain_projects
pip install -r requirements.txtstreamlit run app.pypython app.pyAccess at http://localhost:5000
- Document Embedding: Pre-computes embeddings for knowledge base
- Query Processing: Converts user questions to embeddings
- Similarity Search: Finds top-3 most relevant documents
- Response Generation: Returns answers with confidence scores
- Artificial Intelligence fundamentals
- Machine Learning concepts
- Deep Learning architectures
- Natural Language Processing
- Computer Vision
- Popular AI models (ChatGPT, Gemini, Claude)
- Transformers and neural networks
- AI agents and automation
Add new documents to the knowledge base:
documents = [
"Your new AI fact or concept here",
# Add more documents
]- Embedding Model: sentence-transformers/all-MiniLM-L6-v2
- Similarity Metric: Cosine similarity
- Top-K Results: 3 most relevant answers
Pull requests welcome! Enhance the knowledge base or improve the UI.
Vageesh Goswami
- GitHub: @vageeshgos
- LinkedIn: vageesh-goswami
- Portfolio: vageesh-goswami-portfolio.base44.app