DEV Community

Cover image for I Built an AI Search Engine for WooCommerce — Here's What I Learned (3 Weeks In)
Rafał Groń
Rafał Groń

Posted on • Edited on

I Built an AI Search Engine for WooCommerce — Here's What I Learned (3 Weeks In)

Three weeks ago I launched Queryra — an AI semantic search plugin for WooCommerce that trains on YOUR store's products instead of using generic ChatGPT.
Here's what happened and what I learned.
The Problem I'm Solving
WordPress search runs a LIKE '%keyword%' query against your database. That's the entire search engine behind stores doing thousands in monthly revenue.
Search "gift for mom" on a jewelry store → 0 results. Even when they have a "Rose Gold Heart Necklace" that's literally the perfect gift for mom.
Customers get frustrated, open ChatGPT, and ChatGPT sends them to Amazon.
Why Not Just Use ChatGPT API?
Every "AI search" WordPress plugin from 2024-2025 does the same thing: send user queries to OpenAI, get response, display it.
Problems:

Cost: Every search = API call. A busy store pays $500-1,000+/month to OpenAI
Speed: GPT API takes 2-5s. Users expect <500ms
Generic: ChatGPT doesn't know YOUR products
API key barrier: 99% of WordPress users won't create an OpenAI account

My Approach: Custom Embeddings
Instead of GPT, I use sentence transformers to create vector embeddings of each product. Search queries are converted to vectors too, then matched by cosine similarity.
python# Simplified version of what Queryra does
from sentence_transformers import SentenceTransformer
import chromadb

model = SentenceTransformer('all-MiniLM-L6-v2')

One-time: index products

for product in store_products:
embedding = model.encode(f"{product.name} {product.description}")
collection.add(id=product.id, embedding=embedding)

Per search: find matches by meaning

def search(query):
query_vec = model.encode(query)
results = collection.query(query_vec, n_results=10)
return results # <500ms
Result:

⚡ 5x faster than ChatGPT API
💰 $0 per search (no API calls)
🎯 Better accuracy (trained on YOUR content)
🆓 Free tier possible

Week 3 Numbers

85+ downloads on WordPress.org
3 blog articles published at queryra.com/blog
Live demo running at woo.queryra.com
1 agency (40 people) interested after sending Loom feedback
$0 marketing budget — all organic

Biggest Surprise: AI Chatbots Search For You
I discovered that ChatGPT, Perplexity, and Gemini actively search for plugin information before making recommendations. When someone asks "what's the best WooCommerce search plugin?", they search the web and cite whatever they find.
This means:

Blog articles with structured data → AI finds them
Schema markup (BlogPosting, FAQPage) → AI reads them
llms.txt file → AI specifically looks for this
Comparison pages → AI loves structured comparisons

I spent a week optimizing for what I call AI Engine Optimization (AEO). Early results: Queryra now scores 47/100 across ChatGPT, Perplexity, and Gemini on HubSpot's AEO Grader. Not great, but from zero.
What's Next

More blog content (have 12 articles planned)
Email outreach to WooCommerce stores with broken search
Getting first WordPress.org reviews
Potentially a Shopify version

Tech Stack

Backend: Python 3.11, FastAPI, SentenceTransformers, ChromaDB, PostgreSQL
Frontend: Next.js 14, TypeScript, Tailwind CSS
Plugin: PHP 8.0+, WordPress 6.0+
Infra: AWS Lightsail, Nginx, Docker

If you're building AI features for WordPress — or thinking about it — I'd love to hear your approach. Drop a comment 👇
Links:

🔍 queryra.com
📦 WordPress plugin
💻 GitHub
📝 Blog

Top comments (0)