An AI-powered Knowledge Assistant built using LangChain, Streamlit, Ollama, ChromaDB, and HuggingFace Embeddings.
The application allows users to upload documents, process websites, build a local knowledge base, and chat with AI using Retrieval-Augmented Generation (RAG) — all without requiring any API key.
- 📄 Upload PDF Documents
- 🌐 Process Website URLs
- 🧠 Retrieval-Augmented Generation (RAG)
- 🔍 Semantic Search using Vector Embeddings
- 💾 ChromaDB Vector Database
- 🤖 Multiple Ollama Model Support
- 💬 Conversational Chat Interface
- 📝 Chat Memory
- 🔒 Runs Completely Locally
- 🔑 No API Key Required
- Python
- Streamlit
- LangChain
- Ollama
- ChromaDB
- HuggingFace Embeddings
- BeautifulSoup
- Requests
AI-Knowledge-Assistant/
│
├── project3.py
├── requirements.txt
├── README.md
├── .gitignore
└── project3.ipynb
- Python 3.10 or higher
- Git
- Ollama
Python: https://www.python.org/downloads/
Git: https://git-scm.com/downloads
Ollama: https://ollama.com/download
git clone https://github.com/maherdhami/AI-Knowledge-Assistant.git
cd AI-Knowledge-Assistantpython -m venv venv
venv\Scripts\activatepython3 -m venv venv
source venv/bin/activatepip install -r requirements.txtPull at least one model before running the application.
Recommended:
ollama pull gemma3:latestOptional Models:
ollama pull llama3:8b
ollama pull gemma:2b
ollama pull glm-4.7-flash:latestVerify installed models:
ollama listExample Output:
NAME
gemma3:latest
llama3:8b
gemma:2b
glm-4.7-flash:latest
Open a terminal and run:
ollama serveKeep this terminal running.
Open another terminal.
Activate virtual environment:
venv\Scripts\activatesource venv/bin/activateRun Streamlit:
streamlit run project3.pyOpen your browser and visit:
http://localhost:8501
Choose any installed Ollama model from the sidebar.
Recommended:
gemma3:latest
Upload one or more PDF documents.
Click:
Process Documents
The application will:
- Extract document content
- Split text into chunks
- Generate embeddings
- Store vectors in ChromaDB
- Create a searchable knowledge base
Example Queries:
Summarize this document.
What are the key findings?
Explain chapter 3.
List important points.
Enter a website URL:
https://en.wikipedia.org/wiki/Artificial_intelligence
Click:
Process Documents
The website content becomes part of the knowledge base.
- Runs entirely on local machine
- No OpenAI API required
- No Groq API required
- No Gemini API required
- User data remains local
- Uploaded files are not sent to external services
git clone https://github.com/maherdhami/AI-Knowledge-Assistant.git
cd AI-Knowledge-Assistant
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
ollama pull gemma3:latest
ollama serveOpen a second terminal:
cd AI-Knowledge-Assistant
venv\Scripts\activate
streamlit run project3.pyOpen:
http://localhost:8501
This project demonstrates:
- Retrieval-Augmented Generation (RAG)
- Vector Databases
- Local Large Language Models (LLMs)
- Semantic Search
- LangChain Framework
- Streamlit Application Development
- Document Question Answering Systems
GitHub: https://github.com/maherdhami
LinkedIn: https://www.linkedin.com/in/maher-dhami-a15197225/
This project is developed for educational and academic learning purposes.
Feel free to use, modify, and learn from the code.