You can launch AI search for WooCommerce in three ways: install a ready-made plugin (1–2 days), add semantic search based on embeddings (several weeks of developer time), or run every query through a language model API. For most stores with a catalog of up to a few tens of thousands of products, a hybrid works best: regular keyword search plus vectors, with a model used only where the query is complex. Below you’ll find a comparison of the options, rough costs, eight steps with a check after each one, and the metrics that show whether search has really improved.
Key takeaways
- For most stores, hybrid search works best: keyword search plus embeddings, with an LLM brought in only for complex queries.
- A ready-made plugin can go live in 1–2 days; custom semantic search takes several weeks of developer time.
- Without a baseline (100–200 real queries with expected products) you can't prove AI search beats the default one.
- Key metrics: share of zero-result queries, MRR or nDCG on a test set, search-to-cart conversion and response time.
- Always keep a fallback: if the AI service doesn't respond, standard WooCommerce search takes over.
Contents
Which AI search option to choose for WooCommerce
Standard WooCommerce search looks for word matches in the title, description, short description and SKU. It doesn’t forgive typos, doesn’t know synonyms and doesn’t understand queries like “warm autumn jacket under $80”. On top of that, shoppers often mix languages, use transliteration or make mistakes: “nike sneakerz”, “powerbank 20000”, “iphone charger”. Exactly these queries produce empty results and lost orders.
| Option | How it works | Pros | Cons | When to choose it |
|---|---|---|---|---|
| Ready-made plugin | Indexes the catalog, provides live search, sometimes fuzzy matching or vectors | Launch in 1–2 days, no developer needed | Limited customization, “AI” in the name doesn’t guarantee semantics | Small and mid-size catalog, quick start |
| Embeddings + hybrid search | Product texts and queries are turned into vectors, results ranked by similarity and keywords | Understands synonyms and descriptions in other words, cheap to run | Needs development, a vector store and syncing | Large catalog, complex queries, custom rules |
| Model API on every query | The model breaks the query into filters and clarifications or reranks results | Understands complex phrases, budget, context | Latency, cost per query, safeguards required | Advisory search, picking products “for a task” |
Ready-made plugins
Well-known solutions include FiboSearch, SearchWP, ElasticPress, Algolia and similar. Before you pay, check the documentation for what is actually implemented: often it’s just fast live search and typo tolerance, not semantic understanding. Also check support for your language and its morphology, and whether attributes and variations are indexed.
Semantic search with embeddings
An embedding is a set of numbers that describes the meaning of a text. Queries and products with similar meaning get similar vectors, so “running headphones” finds “sports wireless TWS” even when the words don’t match. Important: Anthropic’s Claude doesn’t create embeddings, so you need a separate model for vectors, for example from OpenAI, Voyage AI, Cohere, or an open multilingual model on your own server. Choose a model that supports your language and test it on your own queries.
Language model API on every query
Here the model doesn’t search, it understands: it turns the shopper’s phrase into a structure with category, price and attributes, which regular search then executes. A fast, cheap model is usually enough for this, and we covered the difference between model tiers in the article Claude Opus, Sonnet or Haiku. API integration with WordPress is described in Claude API and WordPress.
What to prepare before launch: data and a baseline
AI search won’t fix a poor catalog. If products have no attributes and descriptions are a single word, vectors won’t help. So start with two things: clean data and a measurable starting point.
- Catalog. Title, category, brand, key attributes (size, color, material, power), short description, SKU. Merge variations into a single search document.
- Test query set. Take 100–200 real on-site search queries (GA4 search events, Search Console, logs) and for each one list 1–5 products the shopper should see.
- Current figures. Share of zero-result queries, percentage of visitors who leave the site after searching, search-to-cart conversion.
- Stock and prices. Data must update automatically, otherwise search will recommend items that are out of stock.
If product descriptions are thin, improve them first: there are templates in the article prompts for product descriptions. The text you send to the API must not contain customers’ personal data or internal purchase prices; the rules are in the article on safe use of AI in a company.
How to build AI search for WooCommerce: 8 steps
Below is the full path for the hybrid option. If you chose a plugin, do steps 1, 2, 7 and 8, and configure indexing in the plugin itself.

- Record a baseline. Run the test queries through your current search and note the position at which the right product appears. Check: you have a table of “query — expected products — current position”. Common mistake: testing on 10 queries invented by the developer instead of real ones.
- Collect the text for indexing. For each product, build one string: title, category, brand, attributes, short description without HTML. Keep the SKU and title as separate fields too, for exact matching. Check: open 20 random documents and read them through a shopper’s eyes. Common mistake: indexing full HTML with shortcodes and reviews.
- Choose a store and an embeddings model. For a small catalog, Meilisearch, Typesense, Qdrant or Elasticsearch/OpenSearch with a vector field will do; for a large one, a managed cloud version. Compare embeddings models on 30 complex queries. Check: relevant products are found for your language, transliterations and brand names. Common mistake: picking an English-only model and wondering why quality is poor in other languages.
- Index the catalog in batches. Run vector generation through Action Scheduler (included with WooCommerce) in small chunks so you don’t hit API limits and PHP timeouts. Check: the number of documents in the store equals the number of published products. Common mistake: running indexing as one long task in the browser.
- Set up syncing. Subscribe to product save and stock change hooks (for example,
woocommerce_update_productandwoocommerce_product_set_stock), and remove deleted and draft products from the index. Check: change the title and stock of a test product and wait for the update to appear in search. Common mistake: a full reindex once a week when prices change daily. - Build the hybrid query. For each query, run two retrievals: by words (BM25 or full-text search) and by vectors, then merge them, for example with Reciprocal Rank Fusion. Add filters: in stock only, category, price. Check: exact queries by SKU and brand still return the right item in first position. Common mistake: keeping vectors only — SKUs and models like “SM-A556B” are then found worse than in regular search.
- Add model-based query parsing if needed. The model turns the phrase into filters (example below). Always validate the result: only known categories, numbers within reasonable limits. Check: on 30 complex queries the model doesn’t invent attributes. Common mistake: trusting the model’s answer without validation and caching.
- Connect it to the site with a fallback. Show results on the search page or in a live dropdown, set a timeout on the external call and fall back to standard search if the service is unavailable. Check: switch off the search service on staging — the site must keep working. Common mistake: launching straight on the live site without a test environment.
Example prompt for step 7. The system instruction asks to return only JSON, which your code then validates:
|
1 2 3 4 5 6 7 8 |
Ти розбираєш пошуковий запит покупця інтернет-магазину. Поверни ЛИШЕ JSON без пояснень у форматі: {"keywords": ["..."], "category": "..." або null, "price_max": число або null, "attributes": {"колір": "..."}} Доступні категорії: {список_категорій} Не вигадуй категорій і атрибутів, яких немає у списку. Якщо запит незрозумілий, поверни {"keywords": [оригінальний запит]}. Запит: тепла куртка на осінь до 3000 грн |
A skeleton for hooking into WooCommerce search. Write the my_ai_search_ids() function yourself: it queries the store, has a timeout and cache, and returns an array of product IDs. Test on staging:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
add_action( 'pre_get_posts', function ( $q ) { if ( is_admin() || ! $q->is_main_query() || ! $q->is_search() ) { return; } if ( 'product' !== $q->get( 'post_type' ) ) { return; } $ids = my_ai_search_ids( sanitize_text_field( $q->get( 's' ) ) ); if ( empty( $ids ) ) { return; // запасний варіант: стандартний пошук } $q->set( 'post__in', $ids ); $q->set( 'orderby', 'post__in' ); }, 20 ); |
Cache the results of popular queries (for example, for a few hours): usually a small share of phrases drives most search traffic, and caching lowers both cost and latency.
How much AI search for an online store costs
There won’t be exact prices here: API and plugin rates change, so check suppliers’ current pricing pages before you calculate. What you can do is work out the cost structure and plug in your own numbers.
| Cost items | Plugin | Embeddings + hybrid | LLM on every query |
|---|---|---|---|
| Launch (estimate) | 1–4 hours of setup | Roughly 30–80 hours of development depending on the catalog | An extra 10–20 hours for prompts, validation and cache |
| Monthly cost | License or subscription based on queries and products | Server or cloud store + pennies for embeddings API | Tokens per query × number of queries |
| What depends on you | Catalog size, plan | Catalog size, update frequency | Prompt length, model, share of cached queries |
For embeddings the estimate is simple: 10,000 products at 150 tokens each is about 1.5 million tokens. Multiply by your model’s price per million tokens (for compact models this is usually cents) — one-time indexing costs very little, and developer time will be the bigger expense. For LLM parsing, use this formula: (input tokens × input price + output tokens × output price) × queries per month. For a query with 300 input and 100 output tokens, 10,000 queries means 3 million input and 1 million output tokens; plug in the current prices of your chosen model and you get the monthly budget.
If you are already planning a chat assistant, part of the infrastructure can be shared; options and costs are covered in the article on an AI chatbot for WordPress.
How to check AI search quality: metrics
Let’s go back to the test set from the first step. After launch, run the same queries and compare with the baseline. Separately, look at real shopper behavior: the same figures before and after, over equal periods.

| Metric | What it shows | How to calculate |
|---|---|---|
| Share of zero-result queries | How many shoppers saw nothing | Zero-result queries ÷ all queries |
| MRR (mean reciprocal rank) | How high the first relevant product ranks | Average of 1 ÷ the position of the first relevant result |
| Recall@10 / nDCG@10 | Whether the right products reached the top 10 and in what order | Comparison with the test set labels |
| Search conversion | Business result | Sessions with search that ended in an order ÷ sessions with search |
| Exit after search | Dissatisfaction with results | Sessions that ended on the search page |
| Latency p95 | Speed for 95% of queries | Response log; the target is a fraction of a second, otherwise live search becomes annoying |
| Cost per 1,000 queries | Whether the solution pays off | API and server costs ÷ queries × 1,000 |
For a fair conclusion, run an A/B test: half of visitors see standard search, the other half the new one, for at least several weeks to cover different weekdays and promotions. Don’t draw conclusions from a few days: with low traffic, a difference in conversion can be random. After launch, review the top zero-result queries once a month and add synonyms, attributes or pages for them.
Common mistakes and what to do next
- Vectors instead of a hybrid. SKUs, models and brands are better found by keyword search; vectors add understanding of meaning rather than replacing precision.
- No fallback. If the external service goes down, the shopper shouldn’t see an empty page.
- Results that ignore availability. Out-of-stock products shouldn’t sit at the top of results.
- Weak data. The model doesn’t know attributes that aren’t in the catalog.
- No measurement. Without a baseline, “it got better” stays an impression.
- Overly long model responses. Query parsing needs short, structured JSON, not prose.
Don’t send shoppers’ personal data to the API: search queries can contain names, phone numbers or addresses. Clean them before sending and read your provider’s data processing terms.
Don’t show the shopper the model’s answer without checking it. The model can invent a category or specification that doesn’t exist in your store, so apply only the filters your code has confirmed against the list.
The practical takeaway: start with a baseline and 100–200 real queries, try a plugin or hybrid search on a copy of the site and compare the results by the metrics. Bring in an LLM only when complex queries remain that vectors haven’t solved. If you want this kind of search without in-house development, the DiGrand team can analyze your catalog, suggest an option for your budget and implement AI search on WooCommerce; for related scenarios, see also the article on automating customer support with AI.
FAQ
Can I build AI search for WooCommerce without coding?
Yes, with a ready-made plugin: you install it, index the catalog and configure how results look. But check whether the plugin really offers semantic search and not just typo correction. For custom rules and hybrid search you'll need a developer.
How are embeddings better than standard WooCommerce search?
They compare meaning rather than individual words, so they find a product by a synonym or a description in other words. Exact SKU queries, however, are handled better by keyword search, so it's best to combine both approaches.
Do I need a large language model for every search query?
No. For most queries hybrid search is enough, and a model is needed for complex phrases like "jacket under $80 for autumn". Caching popular queries and choosing a fast model cut costs significantly.
How many products can I index, and is it expensive?
The limit depends on the store and hosting, not on the API. One-time embeddings generation for a catalog of a few thousand products usually costs little, but check current prices on the model provider's page.
How do I know the new search is better than the old one?
Compare the share of zero-result queries, MRR or nDCG on the test set and search-to-cart conversion before and after launch. For a reliable conclusion, run an A/B test for several weeks.
Leave a Reply