- Python 3.7+: Ensure you have Python installed. You can download it from python.org.
- Git: To clone the repository. Download from git-scm.com.
- Ollama: Required for embeddings. Download from Ollama.
-
Clone the Repository
git clone https://github.com/a1brz/semantic-vector-search.git cd semantic-vector-search
-
Set Up Python Virtual Environment
- Unix/macOS:
python3 -m venv venv source venv/bin/activate
- Windows:
python -m venv venv venv\Scripts\activate
- Unix/macOS:
-
Install Required Modules
pip install --upgrade pip pip install -r requirements.txt
-
Install and Configure Ollama
- Download Ollama: Visit the Ollama Download Page and follow the installation instructions for your operating system.
- Start Ollama Server:
ollama serve
Note: Ensure that Ollama is running before proceeding to the next step.
-
Download Embeddings Model
ollama pull mxbai-embed-large
Note: This command downloads the
mxbai-embed-large
model. Ensure you have a stable internet connection. -
Run the Semantic Search Script
python semantic_search.py
-
Deactivate Virtual Environment: When you're done, you can deactivate the virtual environment by running:
deactivate
-
Troubleshooting:
- If you encounter issues with
ollama serve
, ensure that no other services are conflicting on the required ports. - Verify that all dependencies are correctly installed. You can list installed packages using:
pip list
- If you encounter issues with
-
Customization: Feel free to modify
semantic_search.py
to better suit your specific use case or to experiment with different embedding models.
semantic-vector-search/
├── venv/ # Python virtual environment
├── requirements.txt # Python dependencies
├── semantic_search.py # Main script for semantic search
├── README.md # This readme file
├── .gitignore # Git ignore file
└── ... # Additional files and folders