R-ROOF-03 or SUB-1004 can blur into the same point.The guidance search worked. The underwriting agent embedded every passage of the policy fixture, embedded the broker's sentence "roof replaced recently but aerial imagery shows an older roof", and the roof-conflict rule R-ROOF-03 came back near the top. That is this site's own case UW-R01, and it is the reason the team wanted vectors in the first place.
Then a routine release changed the code that encodes queries. The new encoder also produces 16 numbers per text, so every insert, every query and every type check passed. The next morning the same broker sentence returned R-ROOF-03, then a note about precedents, a note about sprinkler certificates, the sprinkler rule R-SPRK-01 and the human-decision rule. Every row on the list sounds like underwriting. Only one of the five belongs there. Nothing crashed, and no log line said anything was wrong.
That is case UW-R06, and it is the problem of this page. The previous page ranked rows by distance once each row had numbers. This page opens the box that produces the numbers, so that the reader can say why a vector of the right length can still be the wrong vector.
What this is not. This page explains what an embedding model produces and how to keep vectors compatible. Choosing a model is the next page, model selection; where the vectors are stored is storage; the vector arithmetic itself is on vectors.
From text to a fixed-length vector#
Recall the first primitive of this site in plain words. An embedding column holds one vector per row; a vector query compares the query vector with the rows' vectors, ranks the rows by distance and returns the nearest k; the model reads only what retrieval returned. Retrieval is a query. The model reads only what it returns. Every one of those vectors comes from a function that reads text and writes numbers. That function is an embedding model, and the vector it writes for one text is that text's embedding.
The function runs in five steps. They are worth knowing one by one, because each step is a place where two "identical" pipelines can quietly differ.
Step 1, tokens. The model does not read characters or words directly. A tokenizer, a fixed program that ships with the model, cuts the text into tokens: short pieces such as whole words, word fragments or punctuation, each mapped to an id in the model's vocabulary. "roofing" may be one token or two, depending on the vocabulary. A model also has a maximum number of tokens it reads; text beyond it is cut off. The all-MiniLM-L6-v2 model card says input longer than 256 word pieces is truncated by default; the bge-small-en-v1.5 card gives a maximum sequence length of 512 tokens, as documented on 2026-11-18.
Step 2, the encoder. A trained neural network reads the token ids and writes one vector for each token, where each token's vector already reflects the tokens around it. Nobody hand-writes these numbers; training sets them so that texts with related meaning end up with related vectors. The all-MiniLM-L6-v2 card describes contrastive training: in each batch, the cosine similarity of every possible sentence pair is computed, and the loss rewards true pairs.
Step 3, pooling. The encoder gives one vector per token, and retrieval needs one vector per text. Pooling reduces many token vectors to one. Mean pooling averages them, counting only real tokens and not padding. CLS pooling keeps the vector of a special first token that the model was trained to use as a summary. The all-MiniLM-L6-v2 card uses mean pooling; the bge-small-en-v1.5 card's example takes the first ([CLS]) token, as documented on 2026-11-18.
Step 4, normalization. Normalization scales the pooled vector to length 1, which keeps its direction and drops its size. The vectors page showed why that matters: after normalization, cosine similarity, dot product and Euclidean distance rank rows the same way. Both model cards read for this page L2-normalize in their example code.
Step 5, a fixed dimension. The result has the same length for every input, short or long: 384 numbers for both all-MiniLM-L6-v2 and bge-small-en-v1.5, according to their cards. That fixed length is what lets a database declare a column such as vector(384) and compare any row with any query.
Diagram: Five steps turn a text into one fixed-length vector, and every step is part of the model's identity
Read left to right. The tokenizer cuts the text, the encoder writes one vector per token, pooling reduces them to one, normalization scales it to length 1, and the result always has the same length. Change any step and the same text gets different numbers. Click a box for the toy version and the real model facts.
- Read the text
- Tokenizer: Cuts the text into vocabulary pieces with ids; text past the token limit is cut off.
- Encoder: A trained network writes a vector for each token that reflects its neighbors.
- Make one vector
- Pooling: Reduces many token vectors to one vector for the whole text.
- Normalize: Scales the vector to length 1 so cosine, dot product and L2 rank rows the same.
- Store it
- Fixed dimension: Every text gets a vector of the same length, which the column type checks.
- Model identity: The name and version of the whole pipeline, kept next to the vector so a query can be checked.
Read the diagram as a contract. A stored vector is the output of all five steps together: this tokenizer, this trained network, this pooling, this normalization. Change any one of them and the same text gets different numbers. The dimension, the last box, is the only property a database checks, and it is the one that says least about compatibility.
Under the hood. This site's examples use toy encoders instead of a model: deterministic functions written for teaching. toy-a@1 lowercases the text, keeps words of letters, drops stop words, adds 1 to one of 16 named concept dimensions for each known word, and normalizes the sum. Toy encoders and synthetic data show how the mechanism works, not how good any model or product is.
The five steps, run on the broker's sentence#
The script below runs the toy version of each step on the UW-R01 query. It is meant to make the steps visible: which tokens survive, what pooling produces before normalization, and that the result has length 1 and a fixed dimension. A successful run proves only what the toy encoder does. It says nothing about any real model, whose tokens are vocabulary pieces and whose coordinates have no names.
# embed_steps.py, run from a scratch copy of examples/rag-uw (toy encoders, not models)
from encoders import TOY_A1, TOY_B1, CONCEPTS, EmbeddingMismatch, check_compatible, describe
from vecmath import cosine_distance, dot
text = "roof replaced recently but aerial imagery shows an older roof"
print("1 tokens: ", TOY_A1.tokens(text))
weights = TOY_A1.concept_weights(text)
print("2 pooled: ", {CONCEPTS[i]: w for i, w in enumerate(weights) if w})
vec = TOY_A1.encode_document(text)
print("3 normalized:", describe(vec), "| length", round(dot(vec, vec) ** 0.5, 6), "| dims", len(vec))
print("what the vector cannot see (cosine distance, 0.0 = identical vectors):")
pairs = [("roof older than 25 years", "roof older than 30 years"),
("R-ROOF-01", "R-ROOF-03"),
("SUB-1004", "SUB-1005"),
("building is sprinklered", "building is not sprinklered")]
for a, b in pairs:
d = max(0.0, cosine_distance(TOY_A1.encode_document(a), TOY_A1.encode_document(b)))
print(f" {a!r:32} vs {b!r:32} {d:.4f}")
va, vb = TOY_A1.encode_document(text), TOY_B1.encode_document(text)
print("same text, toy-a@1 vs toy-b@1:", len(va), "and", len(vb), "dims; cosine distance", round(cosine_distance(va, vb), 4))
try:
check_compatible("toy-a@1", "toy-b@1")
except EmbeddingMismatch as e:
print("guard:", e)
1 tokens: ['roof', 'replaced', 'recently', 'but', 'aerial', 'imagery', 'shows', 'older', 'roof']
2 pooled: {'roof': 2.0, 'old': 1.0, 'new': 2.0, 'conflict': 1.0, 'evidence': 2.0, 'travel': 0.1}
3 normalized: roof 0.53, new 0.53, evidence 0.53, old 0.27 | length 1.0 | dims 16
what the vector cannot see (cosine distance, 0.0 = identical vectors):
'roof older than 25 years' vs 'roof older than 30 years' 0.0000
'R-ROOF-01' vs 'R-ROOF-03' 0.0000
'SUB-1004' vs 'SUB-1005' 0.0000
'building is sprinklered' vs 'building is not sprinklered' 0.0000
same text, toy-a@1 vs toy-b@1: 16 and 16 dims; cosine distance 0.8304
guard: index built with toy-a@1, query encoded with toy-b@1: same dimension (16), different space; re-encode the query with toy-a@1 or re-embed the corpus
The first three lines are the pipeline. "an" was dropped as a stop word. "replaced" and "recently" both landed on the new concept, "aerial" and "imagery" on evidence, and "but" on conflict. "shows" is not in the toy lexicon, so it added 0.1 to a dimension picked by hashing the word, which happens to be travel: a small amount of noise, like a token a model has rarely seen. The toy pools by summing word weights; after normalization a sum points in the same direction as a mean, so it plays the role of mean pooling. The rest of the output belongs to the next two sections.
A space where meaning becomes position#
Once a model has embedded many texts, every text is a point in the same space, and the arrangement of those points is what the model learned. That arrangement is called the model's embedding space. Its useful property is that texts used in similar ways sit close together, even when they share no words. In the toy space, "aged roofing" and "older roof" produce exactly the same vector, because the toy lexicon maps "aged" and "older" to old, and "roofing" and "roof" to roof. A trained model reaches a similar effect through training, without a hand-written lexicon, and with far more nuance.
This is what the SQL ladder of the earlier pages could not do. LIKE '%mismatch%' finds nothing for UW-R01, because no passage contains that word. In the embedding space, the broker's sentence lands near R-ROOF-03, whose text talks about roof ages from two sources that differ.
Before AI. A map coordinate is a pair of numbers that only means something inside its coordinate system. Latitude and longitude in one system and easting and northing in a local grid are both two numbers; plot one system's pair on the other's map and the warehouse lands in the sea, with no error. An embedding is a coordinate in one model's space. A vector from a second model is a coordinate from another system.
One model reads the documents and the queries#
Retrieval embeds two kinds of text at two different times. Documents, here guidance passages, applicant profiles and precedents, are embedded once when they are written. The query is embedded at query time, every time. Both sides must use the same model, so that the query and the rows are points in the same space; that is what the term query vector means on this site.
The design that makes this cheap is called a bi-encoder: each text is encoded on its own into a vector, and vectors are compared afterwards with a distance. The sbert documentation describes it that way and contrasts it with a cross-encoder, which reads the query and the document together and outputs a score instead of a vector, as documented on 2026-11-18. Because a bi-encoder encodes documents alone, their vectors can be computed in advance and stored in a column. A cross-encoder cannot be precomputed per row, which is why it appears later in the pipeline, as a reranker over a small candidate set.
The same model can still treat the two sides slightly differently. Some models expect a short instruction in front of the query. The bge-small-en-v1.5 card gives the query instruction "Represent this sentence for searching relevant passages: ", says passages never need it, and says v1.5 works without it with only a slight drop, as documented on 2026-11-18. Google's embeddings API asks for a task type instead, RETRIEVAL_DOCUMENT for the corpus and RETRIEVAL_QUERY for queries, which Google Cloud choices covers. The toy encoders model this too: ToyEncoder.encode_query and encode_document are separate methods, and toy-a@2 prepends "query: " on the query side only.
So "the same model" means more than the same weights. It means the same model, the same version, the same preprocessing, the same pooling and normalization, and the same rule for what goes in front of a query and what goes in front of a document.
What an embedding cannot see#
The second block of the output above is the part a team discovers in production. Four pairs of texts that mean different things received identical vectors from the toy encoder.
Numbers vanish. "roof older than 25 years" and "roof older than 30 years" give the same vector, because the toy keeps letters only. That is how the superseded 2025.4 roof rule (30 years) and the current 2026.2 rule (25 years) tie in search, case UW-R03. Identifiers blur. R-ROOF-01 and R-ROOF-03 both reduce to "roof"; SUB-1004 and SUB-1005 reduce to the hashed word "sub". Negation is weak. "building is not sprinklered" lands on "building is sprinklered", because "not" is a stop word; only the fixed phrase "not eligible" is folded into "ineligible".
A trained model does not have the toy's crude rules, but the same tendencies are a reason to test rather than to assume. A model is trained to place texts by overall meaning, so a single digit or a single "not" moves a long text very little. An id such as R-SPRK-01 carries no meaning a model could have learned; it is a label your organization invented. In this example, the query R-SPRK-01 ranks the sprinkler rule fifth by dense search and first by BM25 (case UW-R02).
The consequence is a design rule, not a limitation to apologize for: anything that must match exactly stays exact. Versions, tenants and dates belong in WHERE clauses, the subject of exact search. Ids, codes and parcel numbers need a lexical signal next to the dense one, the subject of hybrid search.
Common confusion. "The embedding understands the policy." It places the policy text in a space. It does not know that 30 years is more than 25, that a rule id is unique, or that "not" reverses a condition. Those facts are enforced by filters, by lexical search and by the deterministic rules of the agent, never by distance.
Language and domain fit. A model also only knows the kind of text it was trained on. Both cards read for this page describe English models: all-MiniLM-L6-v2 lists English and is intended for sentences and short paragraphs; bge-small-en-v1.5 is English, with separate Chinese variants, as documented on 2026-11-18. Queries in another language, or a vocabulary the training data rarely contained, such as an insurer's band codes, land in parts of the space the model never organized well. Whether a model fits your language and domain is a question for your own labeled queries, which the next page builds into a procedure.
Same dimension, different space: case UW-R06#
Now the opening incident can be explained. The index was built with toy-a@1. The query was encoded with toy-b@1. Both produce 16 numbers. toy-b@1 uses a slightly different lexicon and places its concepts on a different, fixed permutation of the 16 dimensions. The output above shows the result for one text: the same sentence, embedded by both encoders, has a cosine distance of 0.8304 from itself. Dimension 0 means roof in one space and something else in the other.
The arithmetic does not care. A dot product of two 16-number lists always produces a number, and sorting those numbers always produces a top 5. The result looks like retrieval: underwriting passages, plausible order. It is wrong, with an overlap of one row in five against the correct answer.
Four things are routinely confused here, and this site keeps them apart.
| Thing | What it is | What it is not |
|---|---|---|
| Embedding model | The function that makes coordinates; its version, preprocessing, pooling, normalization and task mode define compatibility | A database feature |
| Dimension (384) | The length of the vector | A guarantee that two models' vectors are comparable |
| Index (HNSW, IVFFlat) | A data structure that speeds up search over stored vectors | A model; it never changes what a vector means |
| Distance metric | How closeness is computed: cosine, L2 or inner product | A property of the text; it must match how the model was trained and whether vectors are normalized |
Diagram: Model, dimension, index and metric are four separate things, and only the model check catches a different space
Read left to right for the mismatched query of case UW-R06. The dimension check passes because both encoders write 16 numbers. The index and the metric work on whatever vectors they get. Only comparing the stored model identity with the query's refuses the query. Click a box for what each one checks.
- Makes the coordinates
- Embedding model: Defines what each coordinate means; two models define two spaces.
- What the database sees
- Dimension: Only the vector's length; equal lengths say nothing about compatibility.
- Index: Speeds up search over stored vectors; it never changes what a vector means.
- Metric: Computes closeness; it returns a number for any two vectors of equal length.
- The check that works
- Model guard: Compares the stored model identity with the query's before any distance is computed.
The diagram shows why the incident was silent. The database checks one box, the dimension, and both encoders pass it. Neither the index nor the metric can notice that the coordinates mean something else; they are downstream of the meaning. The only check that catches UW-R06 compares the model's identity.
The lab: query one index with three encoders#
The guidance index in the lab is built with toy-a@1. Encode the query with toy-a@1, toy-b@1 or toy-a@2, all 16 dimensions, and compare the expected neighbors with the actual top 5. Two bar strips show the query vector under each encoder, and a guard checkbox compares embedding_model and refuses a mismatched query. You can type your own query. The encoders are toy functions and the passages are synthetic.
The same results without JavaScript, in this example (index toy-a@1, 13 current passages, top 5; R-... means the GD-2026.2-R-... passage):
| Query | Query with toy-a@1 (correct) | Query with toy-b@1 | Query with toy-a@2 |
|---|---|---|---|
| roof replaced recently but aerial imagery shows an older roof | GD-NOTE-01, R-ROOF-03, R-ROOF-02, R-ROOF-01, GD-NOTE-06 | R-ROOF-03, GD-NOTE-07, GD-NOTE-04, R-SPRK-01, R-HUMAN-01 (overlap 1 of 5) | R-ROOF-01, R-ROOF-02, GD-NOTE-01, R-ROOF-03, GD-NOTE-02 (same rows in part, order differs) |
| large warehouse without sprinklers | R-SPRK-01, GD-NOTE-08, GD-NOTE-04, R-ROOF-02, GD-NOTE-06 | R-ROOF-01, R-ROOF-02, GD-NOTE-01, GD-NOTE-04, R-SPRK-01 | R-SPRK-01, R-HUMAN-01, GD-NOTE-04, GD-NOTE-03, R-ROOF-03 |
| who makes the final decision on a submission | R-HUMAN-01, GD-NOTE-03, GD-NOTE-07, R-SPRK-01, R-ROOF-03 | GD-NOTE-05, R-ROOF-02, GD-NOTE-04, GD-NOTE-07, R-ROOF-01 | R-SPRK-01, GD-NOTE-08, GD-NOTE-04, R-ROOF-03, R-ROOF-02 |
With the guard on, every mismatched query is refused before searching. The toy-a@2 column is a new version of the same encoder, not a different product, and it still breaks the results. A version change is a model change.
The guard, in Python and in SQL#
The standard is simple to state: every stored vector must carry the identity of the model that produced it, and every query must prove it was encoded by the same one before any distance is computed. The example stores that identity in an embedding_model column next to the vector, with the version in the name (toy-a@1). In Python, encoders.check_compatible raises EmbeddingMismatch when the names differ, as the last line of the run above shows.
The same guard in SQL is one bound parameter in the WHERE clause. Below is Q8 of examples/rag-uw/sql/queries.sql, with its recorded output from sql/OUTPUT.md (PostgreSQL 16.14, pgvector 0.8.3, a throwaway database; one run on one laptop, toy data; not a benchmark). The prepared statement binds the query vector, the query's model name and k. A successful run proves that the guarded query returns no rows for a toy-b@1 vector, while the unguarded query returns five plausible, wrong rows. It does not prove the guard is wired into every code path of a real service; a test must.
PREPARE guarded(vector, text, int) AS
SELECT passage_id, round((embedding <=> $1)::numeric, 4) AS cosine_distance
FROM guidance_passages WHERE embedding_model = $2
ORDER BY embedding <=> $1, passage_id LIMIT $3;
EXECUTE guarded(:'q_b', :'m_b', 5);
== Q8 the embedding_model guard in SQL (UW-R06): a toy-b@1 query vector matches no toy-a@1 row
PREPARE
passage_id | cosine_distance
------------+-----------------
without the guard the same vector returns plausible, wrong neighbors:
passage_id | policy_version | status | cosine_distance
---------------------+----------------+------------+-----------------
GD-2025.4-R-ROOF-03 | 2025.4 | superseded | 0.8427
GD-2026.2-R-ROOF-03 | 2026.2 | current | 0.8427
GD-NOTE-07 | 2026.2 | current | 0.8586
GD-NOTE-04 | 2026.2 | current | 0.8713
GD-2025.4-R-SPRK-01 | 2025.4 | superseded | 0.9517
An empty result is the correct answer here, and it is loud: an agent that receives no guidance passages abstains instead of citing the wrong rule. The unguarded rows are quiet failures. Their distances are all above 0.84, which a person might notice in this toy run, but distance values are not a safe alarm: the bge card itself says relative order matters more than absolute scores.
Production pitfall. Re-embedding fixes a model change; reindexing does not. Rebuilding an HNSW index over vectors from the old model leaves every coordinate in the old space. When the model, its version, its pooling or its query prefix changes, every stored vector must be recomputed, and the query side must switch at the same moment. The operations page plans that migration.
What the two builds record#
In the insurance build. In that build, the embedding model is all-MiniLM-L6-v2 with 384 dimensions, run in process through ONNX Runtime from Java, with no embedding API call. Vectors are L2-normalized in code and compared by cosine distance. Corpus A rows carry an embedding_version, and stale rows are found by it and re-embedded in batches.
In Mnemos. In the code read, Mnemos embeds withXenova/bge-small-en-v1.5(384 dimensions) through @xenova/transformers in process, withpooling: "mean"andnormalize: true.
One detail is worth reading carefully, as a documented difference and not a verdict. The bge-small-en-v1.5 card's own example pools with the [CLS] token, and suggests an instruction prefix for short retrieval queries; the Mnemos code read uses mean pooling and the card does not say what happens with other pooling. Both are workable pipelines. They are not the same pipeline: the same text pooled two ways gives two different vectors, so Mnemos vectors and vectors made by the card's example code must never share one index. The rule is the one from UW-R06: pooling is part of the model's identity.
In a coding agent. A coding agent that searches a repository embeds code chunks once and the developer's question at query time. "Find where we retry provider calls" works well as a semantic query. A query that is an identifier, such as a function name, behaves like R-SPRK-01: the embedding blurs it, and grep or a symbol index finds it exactly. If the agent's embedding model is upgraded, the stored chunk vectors are from the old model until they are re-embedded, and the agent's neighbors become plausible and wrong.
A checklist for Monday#
| Question | Why it matters |
|---|---|
| Is the full model identity stored with every vector (name, version, pooling, normalization, prefixes)? | The guard needs something exact to compare (UW-R06) |
| Does every query path check it before computing distances? | A mismatched query returns a plausible, wrong top k with no error |
| Do queries and documents follow the model's own documented rule for prefixes or task types? | The two sides must land in one space |
| Is long text chunked to fit the model's token limit? | Text past the limit is cut off and never embedded |
| Are versions, tenants and dates exact filters, not left to distance? | Numbers and small words barely move a vector (UW-R03) |
| Do id-heavy queries get a lexical signal? | Ids blur in dense search (UW-R02) |
| Is there a test with a known query and its known nearest row? | It fails loudly when the pipeline changes |
What "the same model" has to includeVersion the whole pipeline, and fingerprint it with a test
A model name alone is a weak identity. The same weights can be served through different runtimes, with different tokenizer files, different pooling and different normalization. A practical identity string records the model id and its exact revision, the tokenizer revision, the pooling method, whether output is normalized, the query prefix and document prefix (or task types), the maximum token length, and any text preprocessing done before the model, such as lowercasing or template filling. The insurance build uses an embedding_version per row for the same purpose; this example uses toy-a@1.
A second, cheap defense is a fingerprint test. Keep three or four fixed texts with their expected vectors, rounded, in the repository. At startup or in CI, embed them and compare. Any change in tokenizer, runtime, pooling or prefix moves the vectors and fails the test before a single query is served. The test does not prove quality; it proves the pipeline is the one that produced the stored vectors.
Store the identity per row, not only per table. During a migration, two models coexist, and a row-level column lets a query filter to the rows it can legitimately compare with, as Q8 does.
Long text, truncation and what the vector silently dropsToken limits turn a chunking decision into a correctness issue
A fixed-length vector is produced for any input length, so nothing tells you when the end of a text was ignored. The all-MiniLM-L6-v2 card truncates input longer than 256 word pieces by default; bge-small-en-v1.5 lists 512 tokens. If a guidance section is longer than the limit, the part past the limit has no influence on the vector at all. A rule whose deciding sentence sits at the end of a long section can become unfindable by meaning, while the passage still appears in keyword search.
This is why chunk size is chosen against the model's token limit, measured in the model's tokens, not in characters. The chunking page owns the mechanics; this site's case UW-R08 shows the opposite failure, a chunk boundary that cuts R-ROOF-03 in half.
Mean pooling adds a second effect. Averaging many token vectors pulls a long text's embedding toward its general topic, so one specific condition inside a long passage moves the vector less than it would in a short passage. Shorter, self-contained chunks keep a specific rule closer to queries about that rule. The cost is more rows and more context to assemble later.
Choosing the metric when the documentation is quietNormalize once, then the operator choice stops changing the ranking
A model is trained with a particular similarity in mind; the all-MiniLM-L6-v2 card describes training with cosine similarity between sentence pairs. If a card does not state a metric, two safe facts remain. First, if the vectors are normalized, cosine, inner product and L2 rank rows the same way, so the choice becomes an implementation detail; pgvector's README recommends inner product for normalized vectors, for performance. Second, if the vectors are not normalized and the card is silent, normalizing at write time removes the ambiguity.
What must never change silently is the pair (model, metric) for one set of stored vectors. Changing the metric over the same vectors is a reindex, a new index with a different operator class. Changing the model is a re-embedding. In Mnemos, the code read sets no distance_metric on its vec0 table, so the documented default L2 applies, and the normalized vectors make L2 and cosine rank the same.
Vectors are derived data, governed like the textAccess, deletion and residency follow the source row
An embedding is computed from text, so it belongs to the same data class as the text. A precedent's vector is precedent data; a vector of a private note is private. Three operational rules follow. Access control must apply to vector search exactly as it applies to the rows, which is why this site's case UW-R07 filters by tenant inside the query. Deleting a row must delete its vector everywhere it is stored, including auxiliary tables and caches; the storage page shows a layout where this does not happen by itself. And sending text to an external embedding API sends the text itself, so residency rules apply at embedding time, not only at storage time.
Both builds avoid the last issue by design: the insurance build runs its model in process, and Mnemos embeds locally by default. The insurance build also embeds only banded templates for Corpus A, never raw numbers or personal data, and does not embed the underwriter's reason text for Corpus B.
In one breath#
An embedding model turns text into a fixed-length vector in five steps: tokens, an encoder, pooling, normalization and a fixed dimension, and the vector it writes is that text's embedding. Texts with related meaning land close in the model's space, while numbers, negation and exact ids barely move a vector, so those stay in filters and lexical search. Model, dimension, index and metric are four different things: two models with the same dimension do not share a space, and only a stored model identity checked on every query catches UW-R06. A model change is a re-embedding, never a reindex.
The agent can now explain where its numbers come from and refuse a query from the wrong space. It still runs on a toy encoder, and a real system has to pick a real model: how large, how fast, under which license, in which language, with which prefix, and judged by what evidence. The next page, model selection, turns that choice into a procedure built on the team's own labeled queries.