Menu

If vector search finds the right embeddings, why do we still store the raw text—and why can't we just decode embeddings back into words?
📰

If vector search finds the right embeddings, why do we still store the raw text—and why can't we just decode embeddings back into words?

DEV Community: python·Rahul Vijayvergiya·11 days ago
#n1CNhYKU
#devtopython#devto#dev#embeddings#embedding
Long article (562 words) — no AI summary yet.
Reading 0:00
15s threshold

While learning about RAG (Retrieval-Augmented Generation), I came across an interesting question:

If vector search can find the right information using embeddings, why do we still need to store the original text? Can't we simply convert those embeddings back into words and send them to the LLM?

It sounds like a reasonable idea, but there is something important we need to understand about embeddings.

1. What exactly is an embedding?

An embedding is a list of numbers generated from text by an embedding model. These numbers represent the meaning of the text in a way that computers can understand and compare.

For example, consider this sentence:

"A car needs fuel to run."

An embedding model converts it into something like:

[0.21, 0.85, -0.34, 0.67, 0.12, -0.45, ...]

These numbers represent the meaning of the sentence.

Now, consider another sentence:

"Vehicles require petrol to operate."

Although the words are different, the meaning is almost the same.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.