A Python GUI application that allows you to create and query a local RAG (Retrieval-Augmented Generation) knowledge base using Ollama models.
- Create a knowledge base from local files
- Choose different Ollama models for embeddings and question answering
- Query the knowledge base with natural language questions
- Simple and intuitive GUI interface
- Local processing - no data leaves your computer
- Python 3.8 or higher
- Ollama installed and running locally
- Required Python packages (install using
pip install -r requirements.txt)
- Clone this repository:
git clone <repository-url>
cd <repository-name>- Install the required packages:
pip install -r requirements.txt-
Make sure Ollama is installed and running on your system. You can download it from Ollama's official website.
-
Pull the required Ollama models:
ollama pull llama2
ollama pull mistral
ollama pull codellama- Run the application:
python main.py- Using the application:
- Click "Select Files" to choose the files you want to include in your knowledge base
- Select the embedding model for creating the knowledge base
- Select the QA model for answering questions
- Click "Create Knowledge Base" to process your files
- Once the knowledge base is created, you can ask questions in the question input field
- Click "Ask Question" to get answers based on your knowledge base
The application supports the following Ollama models:
- llama2
- mistral
- codellama
- The knowledge base is stored locally in the
knowledge_basedirectory - Processing large files may take some time
- Make sure you have enough disk space for the vector store
- The application requires an active internet connection to download Ollama models (first time only)
This project is licensed under the MIT License - see the LICENSE file for details.