Mental model
Module 05: Search by meaning, not only words- Understand embeddings conceptually first, then learn similarity, model identity and why embedding choice must be evaluated on your corpus.
Understand embeddings conceptually first, then learn similarity, model identity and why embedding choice must be evaluated on your corpus.
Engineering focus: Search by meaning, not only words
Understand embeddings conceptually first, then learn similarity, model identity and why embedding choice must be evaluated on your corpus.
You are not expected to know the engineering vocabulary before using the idea. Formal terminology comes after the mental model.
Carry one evidence-grounded knowledge assistant through all 18 modules. Preserve source IDs, retrieval evidence, evaluation cases, authority decisions and security assumptions so every improvement is measurable.
An embedding turns meaning into coordinates so nearby vectors can be searched. Nearby does not mean true, current or authorized.
Similarity is a retrieval signal, not a truth score.
An embedding maps text to a numeric vector. Texts with similar meaning tend to be closer in the learned representation space.
A high similarity score means the model thinks two texts are related; it does not prove factual correctness or authorization.
Changing the embedding model changes vector geometry. Re-index when model identity or preprocessing changes.
Embedding models differ by language, domain, size and speed. Evaluate with your own questions and documents.
Module 05: Search by meaning, not only wordsquery: "current VPN reset policy"
0.92 old-policy.md (superseded)
0.88 current-policy.md (active)
Semantic rank says old-policy is close.
Authority metadata says current-policy is eligible.Semantically odd documents rank highly.
Similarity must be validated on your corpus.
Goal: Compute cosine similarity on tiny hand-written vectors, then explain what the score does and does not mean.
python3 - <<'PY2'
from math import sqrt
def cos(a,b): return sum(x*y for x,y in zip(a,b))/(sqrt(sum(x*x for x in a))*sqrt(sum(y*y for y in b)))
print('similar=',round(cos([1,1,0],[.9,.8,.1]),3)); print('different=',round(cos([1,1,0],[0,0,1]),3))
PY2Record the intermediate source IDs, ranks, metadata or state produced by the baseline. Explain which pipeline layer this evidence belongs to.
Create one highly similar vector labelled superseded and one slightly lower-scoring vector labelled active. Explain why authority must remain a separate signal.
Similarity must be validated on your corpus. State the failing layer, change only that layer, then repeat the verification checks.
Record: hypothesis → evidence → change → observed result → remaining limitation. Keep this note with the running Evidence Desk project.
Production RAG improves when every change can be traced to evidence at a specific pipeline layer. In production, retain the before/after evidence so the same failure can become a regression test.
Embedding model/version pinned
No mixed vector spaces
Domain/language fit tested
A numeric representation used to compare semantic similarity.
No. It is a relevance signal, not factual verification.
Because changing the model changes vectors and retrieval behaviour.
When the embedding model or important preprocessing changes.
Progress is saved in this browser immediately. When you sign in to My Learning, it can also sync across devices.
Attempt the core lab and knowledge checks before marking the module complete.