Subtitle: Learn How Embeddings Help AI Find the Right Products Even When Customers Use Different Words.
Imagine This: A Customer Is Shopping on Varastra
Varastra is an Indian ethnic wear e-commerce platform that sells cotton kurtas, sarees, linen co-ord sets, and other traditional clothing.
A customer asks the AI shopping assistant:
"I need something light and comfortable for summer."
Notice something important: the customer never mentioned a kurta, cotton, or linen.
So how can the AI find the right products?
A simple keyword search might look for products containing the word "summer." But a smart AI shopping assistant can look for products whose descriptions have a similar meaning.
This is where embeddings come in.
1. What Is an Embedding?
An embedding converts text into a list of numbers that represents its meaning in a form a computer can compare.
For example, Varastra has these products:
| Product | Description |
|---|---|
| Cotton Kurta | Lightweight cotton for everyday summer wear |
| Linen Co-ord Set | Light, breathable clothing for warm weather |
| Silk Saree | Traditional silk outfit for special occasions |
| Woollen Shawl | Warm clothing for cold weather |
The customer asks for something light and comfortable for summer.
The embedding model converts the customer's question and the product descriptions into numerical representations called vectors.
The system compares these vectors to find products with similar meanings.
The Cotton Kurta and Linen Co-ord Set are likely to be good matches.
The Woollen Shawl is less relevant because it is designed to provide warmth in cold weather.
The key idea: Embeddings help AI search by meaning, not just by matching words.
2. What Does the Diagram Show?
The diagram is called Semantic Space — Meaning Determines Position.
It shows how a computer can represent text as points in a space.
Each circle represents a product. The orange dot represents the customer's question.
Products with similar meanings to the question are shown closer to the orange dot in this illustration.
Let's understand each part.
The Orange Dot — Customer's Question
The orange dot represents the customer's request:
"I need something light for summer."
The embedding model converts this sentence into a vector.
That vector becomes the query point used to search for relevant products.
The Green Circles — Relevant Products
The green circles represent products that are semantically similar to the customer's request.
Cotton Kurta — Similarity: 0.88
The description mentions lightweight cotton and summer wear.
It is a strong match for the customer's needs.
Linen Co-ord Set — Similarity: 0.86
The description mentions light clothing for warm weather.
It is also a strong match, even though the customer never used the word "linen."
The scores shown in the diagram are illustrative. They are not actual measurements from Varastra.
The Purple Circles — Different Products
The purple circles represent products such as a Silk Saree and an Anarkali Suit.
These products may be useful for other shopping requests, but they are less relevant to this particular query.
For example, a silk saree may be a great choice for a festive occasion, but it may not be the best match for someone looking for lightweight summer clothing.
The important point is that the best match depends on the customer's actual request.
The Grey Circle — Low Similarity
The grey circle represents the Woollen Shawl.
Its description focuses on warmth, while the customer is looking for something light for summer.
The diagram shows a similarity score of 0.53.
This suggests that the shawl is a weaker match in this example.
The score does not mean the product is bad. It simply means the product is less relevant to this particular question.
3. What Do the Axes Mean?
The diagram uses two directions to help us imagine how products might be arranged.
Horizontal axis: Warmth
Products are arranged from less warm to warmer.
Vertical axis: Formality
Products are arranged from less formal to more formal.
These axes are used to make the example easy to understand.
Real embedding spaces do not normally have simple, named axes such as warmth and formality. Embeddings often have hundreds or thousands of dimensions, and their relationships are more complex than this two-dimensional drawing suggests.
The diagram also notes that 1,536 dimensions have been compressed into two dimensions for illustration.
This means the drawing is a simplified view of a much more complex space.
4. Why Is the Similarity Score Important?
Look at the scores in the diagram:
| Product | Illustrative Similarity Score | Interpretation |
|---|---|---|
| Cotton Kurta | 0.88 | Strong match |
| Linen Co-ord Set | 0.86 | Strong match |
| Woollen Shawl | 0.53 | Weaker match |
These numbers help the search system compare how closely a product matches the customer's question.
However, similarity scores are not universal percentages of correctness.
A score of 0.88 does not mean an 88% chance that the product is correct. The meaning of a score depends on the embedding model and the similarity measure being used.
A production system should test its retrieval results and choose suitable thresholds for its data.
Remember: Similarity helps the system find relevant products. It does not guarantee that those products satisfy every customer requirement.
For example, a cotton kurta may be a strong semantic match but still cost more than the customer's budget.
Varastra must apply price filters and verify product availability separately.
5. How Does This Help Varastra Find Better Products?
Let's compare two approaches.
Without Semantic Search
Customer:
"I need something light and comfortable for summer."
A basic keyword search looks for products containing the exact word "summer."
It may miss a linen co-ord set described as "breathable clothing for warm weather."
The product is relevant, but its description uses different words.
With Semantic Search
The embedding model represents the meaning of the customer's question and the product descriptions.
The search system can discover that "light and comfortable for summer" is related to "breathable clothing for warm weather."
This helps Varastra find relevant products even when customers use different words from those in the catalog.
The search can then be combined with filters for price, size, color, and availability.
The result is a more useful product discovery experience.
6. How Does This Connect to RAG?
Embeddings are one part of a Retrieval-Augmented Generation (RAG) system.
Here is the simplified process:
Customer asks a question.
"I need something light for summer."Embedding model converts the question into a vector.
The vector represents the question in a form the system can compare.Search finds relevant products.
The retriever looks for product descriptions with similar meanings.The system retrieves product evidence.
It collects relevant descriptions and attributes.The AI reads the evidence.
The language model uses the retrieved information to prepare a response.The customer receives recommendations.
Varastra presents suitable products and verifies important details such as current price and stock.
Embeddings help the system find relevant information. The Grounding Layer supplies that information to the AI so it can answer using evidence rather than relying only on its general knowledge.
7. What Should You Remember?
You do not need to understand the mathematics behind embeddings to understand their purpose.
Remember these four ideas:
- Embeddings turn text into vectors.
- Semantic search finds text with similar meaning.
- Similarity scores help rank search results.
- RAG uses retrieved information to help the AI answer questions.
The next time someone asks how AI can understand a question without matching its exact words, remember this example.
A customer asks for "something light for summer." The system can find a linen co-ord set described as "breathable clothing for warm weather."
The words are different, but their meanings are related.
The real power of semantic search is simple: customers can describe what they want in their own words, and AI can still help them find it.
