Day 2 — The Hidden Backbone of RAG: Embeddings
🚀 Advanced AI Engineering Series

Hi I am Harsha vardhan upadrasta, a 25 year old Web developer, ui/ux designer, and a bug hunter living in Draksharama, India. I am a Computer Science Engineer, currently working with awesome folks at _VOIS.
In the previous article, we explored why modern AI systems need RAG (Retrieval Augmented Generation).
RAG allows AI systems to retrieve relevant information from trusted knowledge sources before generating answers.
But this raises an important question.
How does the system actually find the right information?
If thousands or even millions of documents exist inside a knowledge base, how does the system know which ones are relevant to a user's question?
The answer lies in one of the most important concepts in modern AI systems:
Embeddings.
Embeddings are the hidden backbone that makes RAG systems intelligent.
🧠 What Are Embeddings?
Embeddings are a way to convert text into numbers while preserving meaning.
Computers cannot directly understand human language.
They process numbers.
So when we give a sentence to an AI model, the system converts that sentence into a vector — a list of numerical values.
This vector represents the semantic meaning of the sentence.
In simple terms:
Text → Numbers → Meaning Representation
These numerical representations are called embeddings.
🔍 Why Embeddings Are So Powerful
Embeddings allow AI systems to understand meaning instead of just matching words.
Traditional search systems rely on keyword matching.
For example:
If a document contains the exact word you searched for, it appears in the results.
But this approach has limitations.
People often describe the same idea using different words.
Consider these two sentences:
• Fix database performance issues
• Improve slow SQL queries
The wording is different, but the intent is almost identical.
A traditional keyword search might treat these as unrelated.
However, embeddings recognize that these sentences share the same meaning.
So their numerical representations will be close to each other in vector space.
This ability to capture meaning is called semantic understanding.
⚙️ How Embeddings Work in a RAG System
Let’s look at a simplified RAG workflow.
Step 1 — Documents are converted into embeddings
Step 2 — These embeddings are stored inside a vector database
Step 3 — A user asks a question
Step 4 — The question is also converted into an embedding
Step 5 — The system finds the closest embeddings in the database
Step 6 — Relevant documents are retrieved and sent to the AI model
In short:
Question → Embedding → Vector Search → Relevant Documents → AI Answer
This process allows AI systems to retrieve the most relevant knowledge, even if the words don’t exactly match.
🏥 Real-Life Example: Hospital Knowledge System
Imagine a large hospital with thousands of medical documents.
These documents contain information about:
• disease treatment guidelines
• patient care protocols
• medication recommendations
• clinical research papers
Now imagine a doctor using an internal AI assistant.
The doctor types a query:
“Treatment for high blood sugar.”
However, the hospital documents may contain the term:
“Diabetes management.”
A traditional keyword search might struggle here.
Why?
Because the phrase “high blood sugar” does not exactly match “diabetes management.”
So the system might fail to retrieve the correct document.
But embeddings work differently.
When the doctor enters the query, the system converts the sentence into an embedding.
The hospital documents were already converted into embeddings earlier.
The system then searches the vector database to find documents with similar meaning.
Because “high blood sugar treatment” and “diabetes management” are conceptually related, their embeddings are very close.
So the system retrieves the correct document and provides useful information to the doctor.
This allows the doctor to quickly access the right medical guidelines without manually searching through hundreds of documents.
This is the power of semantic understanding.
🌍 Where Embeddings Are Used in the Real World
Embeddings power many modern AI systems that we use every day.
Some common examples include:
📚 Document Search Systems
Finding relevant documents even when the exact keywords are different.
🛒 Recommendation Engines
Suggesting products similar to what users previously viewed.
🤖 AI Chatbots
Understanding user questions more accurately.
🧠 Knowledge Assistants
Helping employees find internal company information.
🎬 Content Recommendations
Platforms like streaming services suggesting movies based on preferences.
In all these systems, embeddings help machines understand context and meaning.
⚡ Why Embeddings Are Critical for RAG
Without embeddings, RAG systems would struggle to retrieve relevant information.
Embeddings allow AI to:
• understand meaning instead of keywords
• retrieve contextually relevant documents
• improve answer accuracy
• scale to millions of documents
This is why embeddings are considered the foundation of modern AI retrieval systems.



