AI product search lets shoppers describe what they want in natural language, such as “red cotton kurta for office under 1,500 in size M”, and see matching products, instead of guessing keywords and clicking filters. The most reliable design uses a language model only to turn the request into structured filters and a search phrase, then runs a normal product search with those filters and semantic matching on your catalogue. Products shown always come from your real, in-stock data, which keeps results accurate and fast.
Why keyword search fails shoppers
- Shoppers describe needs (“for office”, “for oily skin”), not product names.
- They combine conditions: colour, size, price, material, occasion.
- Keyword search returns zero results for words your catalogue does not use, and zero-result searches lose sales.
The architecture
- UnderstandA model converts the request into filters and a phrase.
- FilterApply price, size, colour, stock and category filters.
- MatchRank remaining products with hybrid keyword and semantic search.
- ShowReal products, with the applied filters visible and editable.
Step 1: turn the request into structured filters
Give the model your catalogue’s allowed filter values and ask it to return only JSON. For the request above, the output might be:
{
"category": "kurta",
"colour": ["red"],
"material": ["cotton"],
"size": ["M"],
"price_max": 1500,
"occasion": "office",
"search_phrase": "office wear cotton kurta"
}
Validate the JSON against your list of allowed values before using it, and drop anything unknown. The model never invents products; it only interprets the request.
Step 2: filter and match
- Apply hard filters in your database or search engine: category, size availability, price, stock.
- Rank the remaining products with hybrid search on the search phrase, combining keyword matching and embeddings of product titles and descriptions. See hybrid semantic search.
- Show the applied filters as chips the shopper can remove or change.
Step 3: handle no results well
If filters leave nothing, relax the least important one, such as occasion or colour shade, and say so: “No red kurtas in M under 1,500; here are maroon options.” Never show products that do not match without explaining why.
Catalogue quality decides results
- Complete attributes for every product: material, colour, size availability, occasion, care
- Descriptive titles and descriptions written for shoppers
- Consistent values: “navy” and “navy blue” merged into one
The same data improves marketplace listings and your product pages’ visibility in search and AI shopping answers. See content modelling.
Measure
- Zero-result rate, before and after
- Search-to-cart and search-to-purchase conversion
- Queries where shoppers remove filters, which show misinterpretation
Frequently asked questions
Should the model write product answers directly?
Only grounded in real product data. Letting a model describe products from memory risks invented features and prices.
Does this slow down search?
The model call adds some time. Cache common requests, and fall back to keyword search if the model is slow or unavailable.
Do internal search pages need to be indexed?
No. Keep internal search results out of crawling; build real category and collection pages for searches with demand.
Sources
- Documentation for structured JSON output in major model APIs
- pgvector and PostgreSQL full-text search documentation