EPIC.search is an AI-powered document search and retrieval system that combines vector search capabilities with Large Language Models (LLMs) to provide intelligent document search and question answering capabilities.
The system uses a modern tech stack and architecture:
- React-based web interface
- Python Flask APIs
- Vector search using PostgreSQL with pgvector
- LLM integration using OLLAMA
- Docker-based deployment
- search-web: React-based frontend application
- search-api: Flask-based orchestration API
- search-vector-api: Vector search engine API
- search-model: OLLAMA-based LLM service
- embedder: Document processing and embedding tool
- Clone the repository
git clone <repository-url>
cd EPIC.search- Set up environment variables
# Copy sample env files for each component
cp search-api/sample.env search-api/.env
cp search-vector-api/sample.env search-vector-api/.env
cp search-web/sample.env search-web/.env- Start the services
docker compose up -dThis will start all the required services:
- Web UI at http://localhost:3000
- Search API at http://localhost:3200
- Vector API at http://localhost:3300
- OLLAMA Model at http://localhost:11434
sequenceDiagram
participant Client as Client
participant WebUI as Web UI
participant WebAPI as Web API
participant VectorAPI as Vector API
participant VectorDB as Vector DB
participant LLM as LLM Model
Note over WebUI,LLM: All components within Docker network
Client->>WebUI: User query
WebUI->>WebAPI: Forward query
WebAPI->>VectorAPI: Process query
VectorAPI->>VectorDB: Keyword search
VectorDB-->>VectorAPI: Search results
VectorAPI->>VectorDB: Semantic search
VectorDB-->>VectorAPI: Search results
VectorAPI->>VectorAPI: Rank & combine results
VectorAPI-->>WebAPI: Return ranked results
WebAPI->>LLM: Generate response
LLM-->>WebAPI: RAG response
WebAPI-->>WebUI: Return response
WebUI-->>Client: Display to user
- Cross Encoder:
cross-encoder/ms-marco-MiniLM-L-2-v2 - Embeddings:
all-mpnet-base-v2 - Keyword Processing:
all-mpnet-base-v2
- OLLAMA-based model service
- Default configuration:
qwen2.5:0.5b - Configurable via environment variables:
MODEL_NAME: Base model (e.g., qwen2.5, llama2)MODEL_VERSION: Model size/version (e.g., 0.5b, 3b)
Each component has its own detailed documentation:
- Web UI Documentation
- Search API Documentation
- Vector API Documentation
- Document Embedder Documentation
For infrastructure and deployment details:
Each component can be run independently for development:
cd search-api
make setup
make runcd search-vector-api
make setup
make runcd search-web
npm install
npm run devcd tools/embedder
pip install -r requirements.txt
python main.pyEach component requires specific environment variables. Check the sample.env files in each component directory for the required variables.
The project is currently deployed in the BC Gov Landing Zone Test environment. Production deployment is planned for the future.
See the LICENSE file for details.