Docs: AI Vector Search (Semantic)
A lightweight, privacy‑first search & recommendations plugin for WooCommerce backed by Supabase (Postgres + pgvector), with optional semantic matches via OpenAI embeddings. Built to work great with the WoodMart live search and standard WooCommerce catalog/search.
Quick start
- Requirements
- WordPress ≥ 6.0, WooCommerce ≥ 7.0
- PHP ≥ 7.4 (8.x recommended)
- Supabase project with pgvector enabled
- OpenAI API key (only if you enable Semantic matching)
- Install
- From Plugins → Add New, search for “AI Vector Search (Semantic)”, install and activate.
- Connect
- Go to AI Vector Search → Settings and add:
- Supabase URL and Anon/Public Key
- (Optional) OpenAI API Key for semantic matching
- (Optional but recommended) In wp-config.php set an encryption key for secrets:
// Base64‑encoded 32-byte key (libsodium or AES‑GCM)
define('AIVESESE_MASTER_KEY_B64', '...');
- Go to AI Vector Search → Settings and add:
- Index products
- Open AI Vector Search → Sync and click Run Full Sync.
- Keep the tab open until batches finish (you’ll see progress).
- Turn it on
- In Settings, enable Catalog search, WoodMart live search, and (optional) Similar products on PDP.
How it works
- Keyword + Vector hybrid: the plugin scores products using keyword relevance and, if enabled, vector proximity for titles, short & long descriptions, and selected attributes.
- Recommendations: optional widgets for Similar products and Bought together based on vector & metadata proximity.
- WoodMart: drop‑in support to replace the theme’s AJAX live search results with higher‑quality matches.
Configuration
Settings
- General
- Supabase URL + Key
- (Optional) OpenAI key for embeddings
- Batch size (default 50–100)
- Respect product visibility (enabled by default)
- Search behavior
- Enable for catalog queries (?s=)
- Enable for WoodMart live search
- Minimum query length
- Hybrid weight (keyword ↔ vector)
- Fields indexed (title, short/long description, selected attributes)
- Recommendations
- Similar products on PDP
- Bought together (cart and PDP)
- Max items (e.g., 4–8)
Indexing & Embeddings
- When Semantic is enabled, the plugin maintains an embedding column in Supabase and updates it during sync.
- You can run a Full reindex or Delta sync from AI Vector Search → Sync.
- WP‑Cron can run small automatic refreshes if you enable Auto sync.
Note: Usage costs for embeddings depend on the model and volume. Check the official OpenAI pricing page for the latest rates.
WoodMart live search
- Enable WoodMart integration under Settings → Search behavior.
- Clear any theme caches/minifiers.
- Test the header search – results should now be powered by Vector Search.