A multimodal product search demo app that shows how to build semantic search and image-based similarity search on top of Oracle AI Database (Vector Search).
This project demonstrates an end-to-end vector search pipeline using CLIP embeddings, Oracle AI Database for similarity search, a FastAPI backend, and a web UI for text and image queries:
Built as developer enablement content and a demo for Oracle AI Database Vector Search, with support for both cloud and local development environments.
Flow (end-to-end):
1) The user submits a text query or image in the UI.
2) The backend generates a CLIP embedding (512-dim) for the query.
3) Oracle AI Database runs a Top-K vector similarity search (optionally combined with category/price filters).
4) The backend returns ranked products (title, image, price, category) to the UI.
β

What happens under the hood:
1) The backend generates CLIP embeddings (512-dim) for both product data (ingestion) and user queries (runtime).
2) At query time, Oracle runs a Top-K similarity search (optionally combined with category/price filters) and returns ranked results.
3) Product vectors are stored in an Oracle VecDB table (default: PRODUCT_TEXT_VECTORS) together with product metadata used by the application.
4) The backend returns UI-ready product objects (title, image URL, price, category) to the frontend.
Result: βfind products like thisβ works for both semantic text and visual similarity, not just keyword matching.
Text semantic search
|
Image similarity search
|
Category & price filters
|
Product details
|
1οΈβ£ Backend
cd backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# update VECDB_REST_URL and either VECDB_USERNAME/VECDB_PASSWORD or VECDB_ACCESS_TOKEN
# set VECDB_SELF_SIGNED_SSL=true only for a trusted self-signed development endpoint
python load_dataset.py
uvicorn main:app --host 0.0.0.0 --port 8000
2οΈβ£ Frontend
cd frontend
npm install
VITE_BACKEND_URL=http://<your_vm_ip_addrs>:8000 npm run dev -- --host 0.0.0.0 --port 5176
This sample is designed to work well with Oracle AI Database environments and can be adapted for common deployment patterns such as:
You can deploy:
For demos and local testing, you can also run against:
This enables:
product_recommendation/
βββ backend/
β βββ .env.example
β βββ config.py
β βββ load_dataset.py
β βββ main.py
β βββ requirements.txt
βββ frontend/
β βββ src/
β βββ package.json
β βββ vite.config.ts
βββ images/
β βββ architecture-high-level.png
β βββ architecture-handdrawn.png
β βββ ui-text-search.png
β βββ ui-image-search.png
β βββ ui-filters.png
β βββ ui-product-details.png
βββ README.md
Backend configuration is loaded from environment variables.
backend/.env.example to backend/.envVECDB_REST_URLVECDB_USERNAMEVECDB_PASSWORDVECDB_ACCESS_TOKEN (takes precedence over username/password)Optional overrides include:
ORACLE_TEXT_TABLEORACLE_DISTANCE_METRICclip-ViT-B-32sentence-transformersfrom sentence_transformers import SentenceTransformer
model = SentenceTransformer("clip-ViT-B-32")
Used for text and image embeddings.
ckandemir/amazon-productstitle, description, price, image_urlIf you want to use your own data:
Product NameDescriptionSelling PriceCategoryProduct SpecificationImage.csv or .jsonload_dataset.py to read your fileload_dataset.py to index into Oracle VecDBRelated notebooks are available under notebooks/vecdb/ for end-to-end Oracle VecDB workflows.
This sample is intended as developer enablement content for Oracle AI Database Vector Search use cases and multimodal search demos.
Main backend endpoints include:
GET /productsGET /categoriesPOST /searchPOST /image-search