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

  1. 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)
  2. Install
    • From Plugins → Add New, search for “AI Vector Search (Semantic)”, install and activate.
  3. 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', '...');
  4. Index products
    • Open AI Vector Search → Sync and click Run Full Sync.
    • Keep the tab open until batches finish (you’ll see progress).
  5. Turn it on
    • In Settings, enable Catalog search, WoodMart live search, and (optional) Similar products on PDP.

How it works

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

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.