A Fashion Product Search and Recommendation Assistant built using:
- Streamlit
- Neo4j Graph Database
- Ollama
- Nomic Embeddings
- Local LLMs (DeepSeek / Qwen)
The application combines semantic search, graph retrieval, and local language models to provide product recommendations without requiring any external API keys.
User Query
↓
Embedding Search
↓
Nearest Graph Entities
↓
Graph Retrieval
↓
Product Context
↓
Local LLM (Ollama)
↓
Structured Product Recommendations
- Semantic product search
- Graph-based product retrieval
- Local embeddings using Nomic
- Local LLM inference using Ollama
- No API keys required
- Product recommendation cards
- Neo4j knowledge graph integration
Install the following software before running the application.
Recommended:
Python 3.11+Install Neo4j Desktop or Neo4j Community Edition.
Create a database and ensure it is running.
Example:
URI: bolt://localhost:7687
Username: neo4j
Password: yourpassword
Install Ollama:
Pull the required models:
ollama pull nomic-embed-text
ollama pull deepseek-r1:1.5bOptional:
ollama pull qwen3:4bgit clone https://github.com/codersbranch/graph_rag_search_app.git
cd graph_rag_search_apppython -m venv venv
venv\Scripts\activatepython3 -m venv venv
source venv/bin/activatepip install -r requirements.txtCreate a file named:
.env
Example:
NEO4J_URI=bolt://localhost:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=yourpasswordUpdate your application to read values from the configuration file.
Import your fashion product dataset into Neo4j.
Sample data will be available under the directory /data
Import the sample data using the command
neo4j stopneo4j-admin database load neo4j --from-path=your_path_to_file --overwrite-destination=trueneo4j startExample graph structure:
Product
├── HAS_TYPE → ProductType
├── HAS_COLOR → Color
├── HAS_SIZE → Size
├── MADE_BY → Brand
├── MADE_OF → Material
└── BELONGS_TO → Category
Example:
Fashion Product 28
├── HAS_TYPE → Jeans
├── MADE_BY → Reebok
├── HAS_COLOR → Red
├── HAS_SIZE → L
├── MADE_OF → Denim
└── BELONGS_TO → Kids
Verify Ollama is running:
ollama listExpected models:
nomic-embed-text
deepseek-r1:1.5b
streamlit run app.pyApplication URL:
http://localhost:8501
Nike Blue Jeans
Show me red shirts
Kids denim products
Reebok products in size L
Show products similar to jeans
fashion-graph-rag/
│
├── app.py
├── .env
├── requirements.txt
├── README.md
│
└── data/
CPU: Intel i5 / Ryzen 5
RAM: 16 GB
Storage: 10 GB
CPU: Intel i7 / Ryzen 7
RAM: 32 GB
GPU: RTX 3060 or higher
Storage: SSD
- Neo4j Vector Indexes
- Hybrid Retrieval
- Product Re-ranking
- Qwen3 Integration
- Product Images
- Chat History
- Advanced Recommendation Engine
MIT License