
Embeddings: close points mean similar meaning
A vector is a point for a chunk. When keyword search is enough, when it is not, and how to refuse a far neighbour.
Sandeep Jaiswal·12 March 2025 · 5 min read
An embedding is a list of numbers that stands for a piece of text. Close lists mean the texts mean similar things. That is the whole idea.
This post shows what that looks like on a desk, when a normal search is enough, and how to catch a bad match.
A picture you can keep
Write three short notes on cards:
- “75% attendance is the college rule.”
- “You need three-quarters of classes to sit the exam.”
- “The canteen closes at four.”
A person can see that the first two are about the same rule. A keyword search may miss that, because the second card never says “75%”.
An embedding model turns each card into a point. The first two points sit near each other. The canteen point sits somewhere else.
You do not need to read the numbers. You only need the distances.
Close points mean similar meaning. Far points do not.
What you actually store
You do not store “the meaning of the universe.” You store one vector per chunk.
A chunk is a heading plus a short passage. Same rule as RAG. If the chunk is the whole PDF, the point is a blur.
For each chunk, keep:
- the text you would show a person
- the heading or page
- the vector
When a question comes in, you turn the question into a vector the same way. Then you pick the nearest chunks.
Three to eight neighbours is enough. The tenth neighbour is usually noise.

If you cannot point at the two close cards, you do not understand the index yet. Draw it.
When a normal search is enough
If the word you care about is in the file — a name, a date, a code — search for that word.
Embeddings help when people ask the same thing in different words. They hurt when you need the exact string.
| Job | Use |
|---|---|
| “Find the heading Attendance” | Keywords |
| “What is the minimum class percent?” | Embeddings, then open the heading |
| “What is the fee in rupees?” | A table or a tool, not a nearest neighbour |
Do not start with a vector database if you have one short PDF. Split it. Search the words. Add vectors when “same idea, different words” starts to fail.
A first project
Take one file you wrote. Split it into chunks you can read out loud in under a minute.
Ask two questions you already know the answers to:
- A question that uses the same words as the file.
- A question that uses different words for the same fact.
For both, write down the top three headings the index returned. Open them.
If the right heading is not in the top three, the chunks are too big, too small, or the question is outside the file.
Add a third question the file cannot answer. The nearest chunks will still come back. That is normal. Your job is to say “none of these are close enough” and stop. Do not answer from a bad neighbour.

A nearest neighbour is still a neighbour. It is not always an answer.
How a match goes wrong
The question is about hostel fees. The nearest chunk is about “fees” for a late library book. The words feel related. The fact is wrong.
Fix the chunking, or add a keyword filter (“hostel”), or refuse when the distance is large. Do not fix it by telling the model “please be accurate.”
Another miss: two chunks that share a tone — both polite, both about college — and almost no shared fact. Tone is not meaning. If you see that a lot, your chunks are fluff. Cut the fluff and keep the rule.
Common mistakes
One vector for the whole book. You will match “the book is about college” to every college question.
No refuse. Every question gets a neighbour. Then every question gets an answer.
Never opening the heading. A pretty score is not a check.
A new database before three tests. Keywords on one file will teach you more.
Mixing your notes with random web pages. Then you cannot tell which point came from you.
Walk through once
You have a one-page note: the 75% rule, two examples (36 of 40 is safe, 25 of 40 is not), and a line about the canteen.
Split it into four chunks: rule, safe example, unsafe example, canteen.
Question A: “What is the 75% rule?” The nearest chunks should be rule and the two examples. Canteen should be last. Open the rule chunk. If it is not in the top two, your split is wrong.
Question B: “How many classes can I miss if I have 36 of 40?” Same file, different words. The safe-example chunk should rise. If the canteen chunk rises, the vectors are matching “college life”, not the numbers. Cut the canteen from this index, or ask a tighter question.
Question C: “When does the bus leave?” Nothing in the file. The nearest chunk might still be canteen, because both are about campus. That neighbour is a trap. You stop.
Write the three heading lists on paper. That is the whole lab. You can do it with a toy embedder later. The paper comes first.
Practise
- Make ten cards from one file.
- Ask the same-words question. Write the top three headings.
- Ask the different-words question. Write the top three again.
- Ask an off-file question. Confirm you stop.
- Only then think about a fancier index.
Checklist
- You can say embedding in one sentence: a point for a chunk.
- You know when to use a normal search instead.
- You have a same-words case and a different-words case.
- A far neighbour does not become an answer.
- You opened the heading, not only the score.
The next step is ten cards and three questions, not a bigger database.
Excelrs