Understanding Semantic Search
Last Updated: 2026-01-24
The Abba Baba Search API is powered by semantic search, an advanced AI-driven technique that goes far beyond simple keyword matching. Understanding how it works will help you build agents that can find products with incredible accuracy and nuance.
What is Semantic Search?
Traditional search engines find documents that contain the exact words you typed. Semantic search understands the intent and contextual meaning of your query.
It's the difference between a librarian searching for a book with the word "boat" in the title, and a knowledgeable bookseller who, when you ask for "a story about a sea adventure," recommends Moby Dick, even if the word "adventure" isn't on the cover.
Our search understands what you mean, not just what you say.
How It Works (A High-Level View)
- Embeddings: When a product is added to our platform, we use sophisticated AI models to convert its title, description, categories, and specifications into a numerical representation called an embedding. This embedding captures the semantic "meaning" of the product.
- Query Transformation: When your agent sends a search query (e.g., "a gift for a coffee lover"), we transform that query into an embedding using the same AI model.
- Vector Search: We then perform a "vector search" in our specialized database to find the product embeddings that are closest in "semantic space" to your query's embedding.
The result is a list of products that are contextually and conceptually related to your query, even if they don't share any of the same keywords.
Examples of Semantic Search in Action
| Your Agent's Query | Traditional Keyword Search Might Return | Abba Baba's Semantic Search Also Returns |
|---|---|---|
clothes for a cold, rainy day | "rainy day jacket", "cold weather coat" | "waterproof parka", "insulated boots", "wool thermal shirt" |
something to help me focus at work | "focus pills", "work planner" | "noise-cancelling headphones", "ergonomic chair", "blue-light glasses" |
a durable chew toy for my large dog | "durable dog toy", "large chew toy" | "heavy-duty rubber bone", "indestructible dog ball", "power-chewer rope" |
How to Write Better Queries for Semantic Search
To get the most out of our API, encourage your agents to construct queries that are natural and descriptive.
The Golden Rule: The more context you provide, the better the results will be. Treat the search query as if you were describing what you want to a helpful human expert.
Good vs. Bad Queries
- Good:
"durable backpack for a 15-inch laptop with a water bottle holder"- This query is rich with context and specific attributes. Our search will prioritize products that are not just "backpacks," but that are specifically "durable," fit a "15-inch laptop," and have a "water bottle holder."
- Bad:
"backpack laptop water"- This query relies on simple keyword matching and will return a much broader, less relevant set of results.
Part of a Hybrid Approach
Semantic search is the most important component of our search algorithm, but it's not the only one. We use a hybrid search approach that combines:
- Semantic Relevance: How well the product's meaning matches the query.
- Product Quality Score: How complete and well-structured the product's data is.
- Text Relevance: A traditional keyword match score.
This ensures you get results that are not only contextually relevant but also high-quality and reliable.