C, tenant book-east, policy version 2026.2.The insurer's retrieval data already sits in PostgreSQL, in three tables a backend engineer would design without thinking about AI. guidance_passages holds one passage of the policy fixture UW-GUIDE per row, with rule_id, policy_version and status. applicant_profiles holds past submissions with occupancy, construction, wind_zone, tenant and roof age. precedents holds decided cases with decision, policy_version, override, decided_role and a written rationale.
Three requests arrive the week SUB-1004 comes in. An analyst wants every past office profile in wind zone C for the book-east book of business. The underwriting agent wants past applicants that look like SUB-1004: a sprinklered masonry office, 10,000 to 25,000 sq ft, built 1990 to 2010, roof 20 to 30 years old by the provider's figure. And it wants the guidance for this site's own case UW-R01: "roof replaced recently but aerial imagery shows an older roof".
The first request is one line of SQL, and it returns exactly the right rows. The second has no column to filter on, because "looks like" is not a value. The third looks like a text search, and the obvious text search, body ILIKE '%mismatch%', returns zero rows from a table that contains the governing rule, R-ROOF-03. Zero rows is the worst kind of wrong answer, because it reads as "the policy says nothing".
This page climbs the ladder that SQL engineers already own, from WHERE to LIKE to full-text search to BM25, runs each rung on the example, and marks the exact point where each one stops. That point is where vectors begin.
What this is not. This page does not merge keyword and vector results into one ranking; that is reciprocal rank fusion on the hybrid page, which uses BM25 without deriving it again. Retrieval as a query the model writes for itself is a tool-design question, covered at tools.sammuthu.com.
The first primitive, before any vector#
Every page of this site keeps one sentence true. When retrieval uses vectors, an embedding column holds one vector per row; a vector query compares the query vector with each row's vector, 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.
This page stays before the vectors on purpose. Every rung below is also a query that returns rows, and every rung has the same consequence: rows it does not return never reach the model. The question for each rung is which rows it can return, and which ones it cannot reach however the query is written.
What WHERE does well: exact values, found fast#
A WHERE clause keeps the rows whose columns satisfy a condition and drops the rest. WHERE wind_zone = 'C' keeps rows in wind zone C. It does not rank; a row passes or it does not.
To avoid reading every row, the database keeps an index: a sorted structure over a column that jumps to the matching rows. PostgreSQL creates a B-tree index by default, and its planner considers a B-tree for comparisons with <, <=, =, >= and >, as documented on 2026-11-18. A btree index keeps values in sorted order in a balanced tree, so finding C among the wind zones takes a few page reads instead of a full scan.
The example's schema has exactly such an index for the exact filters of Corpus A:
-- from examples/rag-uw/sql/schema.sql (ran on the throwaway database, 2026-11-18)
CREATE INDEX profiles_zone_tenant ON applicant_profiles (wind_zone, tenant);
CREATE INDEX guidance_version_status ON guidance_passages (policy_version, status);
Before AI. This is the part of retrieval that has worked for decades. A tenant column with a btree index is how every multi-tenant application keeps one customer's rows away from another's. Nothing on this site replaces it. Tenant, policy version, status and dates stay exact filters in WHERE, also when a vector ranking is added later.
Where WHERE stops: "similar" is not an operator#
Take the small table the vectors page and the lab use: five synthetic property records, each with a roof_type and a wind_zone. An engineer who wants risky roofs writes:
-- illustrative; the five rows are vecmath.FIVE_ROWS in examples/rag-uw
SELECT id, label FROM five_rows WHERE roof_type = 'metal';
It returns rows 2 and 4, "new roof, wind zone C" and "new roof, wind zone A", the two metal roofs, and nothing else. The answer is exact and complete. It is also the answer to a question nobody asked. The underwriter's real question is "which records look like an older roof in a high-wind zone", and that question has no value to compare against. Row 1, "older roof, wind zone C", is the closest match, and roof_type = 'metal' cannot rank it, because WHERE keeps or drops and never orders by resemblance.
Corpus A shows the same wall at full size. SUB-1004's profile has seven bands. Requiring all seven to match exactly returns only identical profiles, often none. Relaxing them by hand ("drop the area band, then the construction band") invents a ranking one condition at a time, and every engineer invents a different one.
In the insurance build. The insurance build hits this wall and handles it in two layers. Its Corpus A query applies a structured filter first, thenORDER BY embedding <=> :q LIMIT 8, and widens the filter step by step when fewer than 3 rows come back, reporting each step. The exact filter stays inWHERE; resemblance moves to a vector distance.
LIKE: matching characters, not words#
The first tool for text is LIKE. It returns true when a string matches a pattern, where % matches any run of zero or more characters and _ matches one character. As documented on 2026-11-18, LIKE always covers the entire string, so a substring search needs % on both sides, and ILIKE is a case-insensitive form that PostgreSQL adds beyond the SQL standard.
The example ran the UW-R01 attempt on the throwaway database. The query below comes from examples/rag-uw/sql/queries.sql; its output is the recorded run in sql/OUTPUT.md (PostgreSQL 16.14, pgvector 0.8.3, one run on one laptop, toy data). A successful run proves only that no guidance passage contains the characters "mismatch".
-- Q2 in examples/rag-uw/sql/queries.sql (ran 2026-11-18, throwaway database)
SELECT count(*) AS like_mismatch_rows FROM guidance_passages WHERE body ILIKE '%mismatch%';
== Q2 LIKE cannot find the meaning (UW-R01): no passage contains the word
like_mismatch_rows
--------------------
0
The rule exists. Its text says the two roof ages "differ by more than 5 years". "Differ" is not "mismatch", and LIKE compares characters. Widen the pattern to '%roof%' and the example returns five current passages: all three roof rules and two notes, in no order, with no way to say which matters.
LIKE also has a cost problem. PostgreSQL's documentation says a B-tree can serve LIKE only when the pattern is a constant anchored at the start, such as 'foo%', and not '%bar', and that outside the C locale the index needs a special operator class. A pattern with a leading % reads every row.
Production pitfall. An empty result from LIKE looks the same as "nothing relevant exists". If an agent's tool returns zero rows and the agent reports "no applicable rule", the failure is invisible. Log which retrieval method ran and how many rows it saw, and treat zero rows on a policy question as a signal to investigate, not as an answer.
Full-text search: words, normalized, through an inverted index#
Full-text search fixes two of LIKE's problems. It matches words instead of characters, and it uses an index instead of reading every row.
It starts by turning each document into a list of normalized words. PostgreSQL calls them lexemes: words folded to lower case, often with suffixes removed so that different forms of a word become alike, and with stop words (words too common to help, such as "the") dropped. Removing suffixes this way is stemming: "roofs" and "roof" become one term, "differs" and "differ" become one term. The PostgreSQL documentation lists Snowball stemmer rules among its dictionaries.
Then it builds an inverted index: for every term, the list of documents that contain it, the way the index at the back of a book lists the pages for each word. A query looks up its terms and intersects their lists, without touching documents that contain none of them. PostgreSQL's GIN index is documented as an inverted index and as the preferred index type for text search.
The example's guidance table carries both pieces:
-- from examples/rag-uw/sql/schema.sql (ran 2026-11-18, throwaway database)
body_tsv tsvector GENERATED ALWAYS AS (to_tsvector('english', body)) STORED,
CREATE INDEX guidance_body_tsv ON guidance_passages USING gin (body_tsv);
Diagram: Full-text search: documents become normalized terms, and each term points to the documents that contain it
Read left to right. At write time each passage is split into words, normalized into lexemes and added to an inverted index. At query time the query goes through the same normalization and each term looks up its list. A term with no list matches nothing, whatever it means. Click a box for the example.
- Write time
- Passage text: The body of one guidance passage, stored in a text column.
- Lexemes: to_tsvector normalizes words so different forms match and drops words too common to help.
- The index
- Term to passages: For every term, the list of passages that contain it, like the index at the back of a book.
- Query time
- Query terms: The query is normalized with the same configuration as the documents, then each term looks up its list.
- Empty list: A query word that no passage contains finds nothing, even when a passage means the same thing.
The diagram shows why full-text search is fast and why it is still literal. Lookup goes term by term. A query term that appears in no document has an empty list, whatever it means. "Mismatch" has no list in this corpus, and "differ" is not in the query.
The run of Q7 in sql/OUTPUT.md uses this index for the exact identifier of case UW-R02. Its lexical column ranks the passage of R-SPRK-01 first among the current passages, and it is the only passage the full-text query matches at all. The same query also fuses in a vector ranking, which the hybrid page explains; here only the lexical rank matters. The output is trimmed to its first row (the ... line); the full output is in sql/OUTPUT.md.
== Q7 hybrid: full-text CTE + vector CTE fused with reciprocal rank fusion, k = 60 (UW-R02)
(ts_rank_cd is PostgreSQL full-text ranking, not BM25; RRF uses only the ranks)
PREPARE
passage_id | lexical_rank | dense_rank | rrf_score
---------------------+--------------+------------+-----------
GD-2026.2-R-SPRK-01 | 1 | 5 | 0.031778
...
Common confusion. PostgreSQL'sts_rankandts_rank_cdare not BM25. The documentation says its ranking functions use no global information: they look at one document and the query, not at how rare a term is across the whole table. BM25, below, depends on exactly that corpus-wide rarity. Both are useful; they are different functions, and a page or library that callsts_rank"BM25" is wrong.
BM25 by hand: rare words in short texts rank first#
A ranking for keyword search should reward three things. A document that contains a query term several times is more likely about it, but the tenth occurrence adds less than the first. A term that appears in few documents tells you more than one that appears everywhere. And a match in a short passage means more than the same match in a long one.
The older formula for the first two is TF-IDF: term frequency times inverse document frequency. A term's weight grows with how often it appears in the document and with how rare it is across the corpus. BM25 keeps that idea and adds two corrections: term frequency saturates instead of growing without limit, and the score is normalized by document length. For each query term t in document d:
idf(t) = ln( (N - n_t + 0.5) / (n_t + 0.5) + 1 )
score(t, d) = idf(t) * tf * (k1 + 1) / ( tf + k1 * (1 - b + b * dl / avgdl) )
score(d) = sum of score(t, d) over the distinct query terms
N is the number of documents, n_t the number that contain t, tf the count of t in d, dl the length of d in tokens and avgdl the average length. k1 controls how fast term frequency saturates and b how strongly length matters. Lucene's BM25Similarity and Elasticsearch default to k1 = 1.2 and b = 0.75, as documented on 2026-11-18, and the example uses the same values in lexical.py.
Now compute one term by hand for UW-R02. The corpus is the 13 current guidance passages, so N = 13, and their average length is avgdl = 30.54 tokens. The token r-sprk-01 appears in one passage, so n_t = 1. In that passage, GD-2026.2-R-SPRK-01, it appears once (tf = 1), and the passage is 37 tokens long.
- idf = ln((13 − 1 + 0.5) / (1 + 0.5) + 1) = ln(12.5 / 1.5 + 1) = ln(9.3333) = 2.2336.
- Length factor: 1 − 0.75 + 0.75 × 37 / 30.54 = 0.25 + 0.9087 = 1.1587.
- Denominator: 1 + 1.2 × 1.1587 = 2.3904.
- Term score: 2.2336 × 1 × 2.2 / 2.3904 = 2.0557.
The script below checks that arithmetic against the example's BM25Index and prints the per-term contributions for both of this page's queries. It is a short file added to a scratch copy of examples/rag-uw; it only calls data.py and lexical.py. A successful run proves the hand computation matches the code and shows which terms each ranking rests on. It does not show that BM25 suits any real corpus: 13 synthetic passages are a teaching set.
# bm25_by_hand.py, run from a scratch copy of examples/rag-uw
import data
import lexical
current = [p for p in data.guidance_passages() if p["status"] == "current"]
ids = [p["passage_id"] for p in current]
index = lexical.BM25Index.build(ids, [p["text"] for p in current])
print(f"N = {index.N} passages, avgdl = {index.avgdl:.2f} tokens")
for query in ["R-SPRK-01", "roof replaced recently but aerial imagery shows an older roof"]:
print(f"\nquery: {query!r}")
print("tokens:", lexical.tokenize(query))
for rank, (pid, score) in enumerate(index.search(query, 4), start=1):
i = ids.index(pid)
print(f" {rank}. {score:6.3f} {pid:20s} dl={len(index.docs[i])} {index.explain(query, i)}")
term, pid = "r-sprk-01", "GD-2026.2-R-SPRK-01"
i = ids.index(pid)
print(f"\nby hand for {term!r} in {pid}: n_t = {index.df[term]}, tf = {index.tf[i][term]}, "
f"dl = {len(index.docs[i])}, idf = {lexical.idf(index.N, index.df[term]):.4f}")
print("LIKE '%mismatch%':", lexical.like_search(current, "text", "%mismatch%", "passage_id"))
print("LIKE '%roof%':", len(lexical.like_search(current, "text", "%roof%", "passage_id")), "rows, unranked")
N = 13 passages, avgdl = 30.54 tokens
query: 'R-SPRK-01'
tokens: ['r-sprk-01', 'r', 'sprk', '01']
1. 6.247 GD-2026.2-R-SPRK-01 dl=37 {'r-sprk-01': 2.055658, 'r': 0.85988, 'sprk': 2.055658, '01': 1.275858}
2. 2.337 GD-2026.2-R-HUMAN-01 dl=30 {'r': 0.941098, '01': 1.396367}
3. 2.218 GD-2026.2-R-ROOF-01 dl=34 {'r': 0.892905, '01': 1.32486}
4. 0.871 GD-2026.2-R-ROOF-02 dl=36 {'r': 0.870613}
query: 'roof replaced recently but aerial imagery shows an older roof'
tokens: ['roof', 'replaced', 'recently', 'but', 'aerial', 'imagery', 'shows', 'an', 'older', 'roof']
1. 6.565 GD-NOTE-01 dl=32 {'roof': 1.267613, 'aerial': 2.190701, 'imagery': 2.190701, 'an': 0.916368}
2. 3.568 GD-2026.2-R-ROOF-01 dl=34 {'roof': 1.433384, 'older': 2.134609}
3. 2.285 GD-2026.2-R-ROOF-02 dl=36 {'roof': 1.414011, 'an': 0.870613}
4. 1.727 GD-2026.2-R-ROOF-03 dl=73 {'roof': 1.13117, 'an': 0.595552}
by hand for 'r-sprk-01' in GD-2026.2-R-SPRK-01: n_t = 1, tf = 1, dl = 37, idf = 2.2336
LIKE '%mismatch%': []
LIKE '%roof%': 5 rows, unranked
The first query shows BM25 at its best. The full id r-sprk-01 and its part sprk each occur in one passage, so each carries the highest idf in the corpus, and the right passage scores more than twice the next one. The tokenizer in lexical.py keeps a hyphenated id whole and also emits its parts, which is why r and 01 give small scores to other rules.
The second query shows the limit. R-ROOF-03 ranks fourth. It shares only "roof" and "an" with the query, two common terms, and at 73 tokens it is more than twice the average length, so length normalization pulls its score down further. R-ROOF-01, the age-limit rule, ranks second because it contains "older". Every number is correct, and the ranking is still wrong for the question, because BM25 scores words and the query's words are not the rule's words.
The lab: keyword ranking against the vector ranking#
The lab below ranks the 13 current guidance passages with BM25 only, as on this page. Pick a query and read the per-term contributions next to each row; edit the ILIKE pattern (it starts at %mismatch%) to see how many rows a substring match returns. Vector and fused rankings of the same queries are on the hybrid page's version of this lab. The vectors behind the comparison table come from a toy encoder, a deterministic stand-in for an embedding model with 16 dimensions; toy encoders and synthetic data show how the mechanism works, not how good any model or product is.
The same comparison without JavaScript, from the runs above (bm25_by_hand.py for BM25, run_demo.py --case UW-R01 and --case UW-R02 --verbose for the toy vector ranks):
| Query | Passage it should find | BM25 rank (score) | Toy vector rank | LIKE result |
|---|---|---|---|---|
R-SPRK-01 (UW-R02) | GD-2026.2-R-SPRK-01 | 1 (6.247) | 5 | not run |
roof replaced recently but aerial imagery shows an older roof (UW-R01) | GD-2026.2-R-ROOF-03 | 4 (1.727) | 2 | '%mismatch%': 0 rows |
Read the table across. Each method wins one row and loses the other. Keyword ranking is exact about identifiers and literal about everything else. The toy vector ranking blurs the identifier R-SPRK-01 into a hashed unknown word and ranks it fifth, and it places the paraphrase near the rule it describes.
Diagram: The SQL ladder: each rung finds more, and none of them can match a meaning
Read left to right. Each rung is a query an SQL engineer already knows. Under each one: what it can find and the case that shows where it stops. The last box is the gap the next page fills with vectors.
- Exact values
- WHERE + btree: Finds exact values fast and completely; never ranks by resemblance.
- Characters
- LIKE '%...%': Matches characters anywhere in a string; a leading % cannot use a btree.
- Words
- Full-text search: Matches normalized words through an inverted index; ts_rank is not BM25.
- BM25: Ranks by term frequency with saturation, rarity across the corpus, and length.
- The gap
- Same meaning, other words: No word-matching rung connects two texts that share a meaning but not their words.
The ladder diagram summarizes the climb. Each rung finds something the rung below could not: exact values, then substrings, then normalized words, then a ranking by rare words. No rung connects two texts that share a meaning but not their words. That gap is not a missing feature of PostgreSQL; it is a limit of matching on words at all.
The failure on Corpus B: a paraphrased rationale#
The gap matters most for precedents. A precedent's value is its rationale: why an underwriter decided as they did. Underwriters write rationales in their own words. One writes that the broker's roof age and the provider's figure disagree; another that the stated age conflicts with aerial imagery; a third that the application understates the roof's age. They mean the same thing.
An agent that searches Corpus B for SUB-1004 with keywords finds the rationales that happen to use its words and misses the rest. Unlike the guidance case, there is no rule id to fall back on. The precedents the agent never retrieves never reach the model, and the underwriter never sees the decided cases that disagree with the recommendation. That is a retrieval failure dressed up as an absence of precedent.
In our insurance agent.find_similar_decisions(SUB-1004)therefore embeds each precedent's rationale with its banded context and ranks precedents by vector distance, withtenantandstatusas exact filters inWHERE. Keyword search stays in the design for identifiers such asR-ROOF-03, and the two lists are merged on the hybrid page.
What the tools document, and what they do not#
PostgreSQL full-text search is built in: to_tsvector turns a document into lexemes with positions, dropping stop words; plainto_tsquery joins plain words with AND; websearch_to_tsquery accepts web-search syntax and does not raise syntax errors; GIN is the preferred index; GiST is lossy and needs rechecks. Its ranking functions are ts_rank, based on how often matching lexemes appear, and ts_rank_cd, which also uses their proximity. All of this is as documented on 2026-11-18 for PostgreSQL 18, the current documentation; the example ran on PostgreSQL 16.14.
Lucene and Elasticsearch use BM25 as their default similarity, with k1 = 1.2 and b = 0.75. The BM25 review by Robertson and Zaragoza says the model itself gives no guidance on setting k1 and b, and reports that values in roughly 0.5 to 0.8 for b and 1.2 to 2 for k1 work reasonably well in many circumstances, with the best values depending on the documents and queries. Which products offer BM25 next to vectors is recorded on ecosystems.
In a coding agent. Grep isLIKEfor a repository: exact, fast on small trees, and blind to meaning. Searching forretrymisses code that saysbackofforattempt. A symbol index is the btree of code search, perfect when you know the name. A BM25 index over code files ranks rare identifiers well, which is why identifier questions stay lexical even after semantic search is added.
A checklist for Monday#
| Question | Why it matters |
|---|---|
| Which conditions are exact (tenant, version, status, dates)? | They stay in WHERE with a btree, inside every retrieval query |
Does any retrieval path use LIKE '%...%'? | It matches characters, reads every row, and returns an empty set that looks like "nothing exists" |
Do you know what your tokenizer does with R-ROOF-03? | One token, three tokens or both decides whether the id can match |
| Is a full-text rank being described as BM25? | ts_rank uses no corpus statistics; BM25 does |
| Are k1 and b defaults or tuned on labeled queries? | The BM25 review says the best values depend on your documents and queries |
| What does a zero-row result trigger? | It must be logged and investigated, never reported as "no rule applies" |
| Which queries are paraphrases of stored text? | Those are the queries no word index can answer (UW-R01) |
The tokenizer decides what an exact term isIdentifiers, hyphens, versions and what PostgreSQL does with them
Keyword search is only as exact as its tokenizer. The example's lexical.tokenize keeps r-sprk-01 as one token and also emits r, sprk and 01. That choice has consequences you can read in the run above: the whole id gives a high-idf match on exactly one passage, and the parts give small scores to every rule whose id ends in 01.
Other choices fail differently. A tokenizer that splits on hyphens only, and drops the whole id, cannot tell R-ROOF-01 from R-ROOF-03 except by the tokens 01 and 03, which also match dates and version strings. A tokenizer that keeps only whole tokens cannot match a user who types "ROOF 03". Version strings such as 2026.2 may be split at the dot, kept whole or dropped as numbers.
PostgreSQL's parser has its own rules for hyphenated words and numbers. This page does not state what to_tsvector('english', 'R-ROOF-03') produces from memory; the honest step is to run it on your PostgreSQL version and configuration and put the output in a test. Whatever the tokenizer does to stored text, it must do identically to queries. Many teams also store identifiers in their own column and match them exactly, which removes the question for the ids that matter most.
Tuning BM25 without fooling yourselfk1, b, field weights and the labeled queries that decide them
k1 and b are not universal constants. Raising k1 lets repeated terms keep adding to the score; lowering it makes the first occurrence count most. Raising b punishes long documents more. In the run above, R-ROOF-03 at 73 tokens loses to shorter passages partly because of b = 0.75. A lower b would raise it, and would also raise every long, rambling passage.
The defensible way to choose is the one the BM25 review implies: values depend on your documents and queries, so measure. Hold out a set of labeled queries with known relevant passages, compute recall and MRR at a few settings, and keep the default unless a change wins on the held-out set and not only on the queries you tuned on. The metrics are computed by hand on the evaluation page.
Field weighting is the other lever. A passage has a rule_id field and a body; a match in rule_id is stronger evidence than a match in prose. The example's weighted_bm25 scores each field separately and sums them with weights such as 3 for rule_id and 1 for the body. Field weights are configuration, and they deserve the same held-out test as k1 and b. The hybrid page uses them.
Operating text indexes: GIN, GiST and generated columnsWhat the documentation says, and what to measure yourself
The PostgreSQL documentation, as read on 2026-11-18, prefers GIN for text search. GiST is lossy: it stores fixed-length signatures (124 bytes by default) and must recheck candidate rows against the real document, so a GiST-backed search can read rows that turn out not to match. GIN does not store the weight labels that setweight attaches to lexemes, so ranking that depends on weights reads them from the row.
The example stores body_tsv as a generated column. That keeps the lexemes in step with the body in the same transaction: an UPDATE to a passage's text updates its tsvector and its index entries together, with no separate pipeline that can fall behind. The alternative, computing to_tsvector inside every query, works with an expression index but makes it easy to use a different text-search configuration in the query than in the index, which silently stops the index from being used.
What the documentation read here does not give is the cost of keeping a GIN index current under heavy writes on your data. Measure it with your insert and update rate before relying on it, the same way the scale page measures vector indexes.
Why keyword search stays in production after vectors arriveIdentifiers, explainability and audits
The run on this page makes the case in two numbers: BM25 ranks R-SPRK-01 first, and the toy vector encoder ranks it fifth. Exact identifiers, policy codes, parcel numbers, error codes and product names are where embeddings are weakest and where users are most certain of what they typed. Removing keyword search to "go semantic" turns the easiest queries into the hardest.
Explainability is the second reason. A BM25 score decomposes into per-term contributions, as explain printed: an underwriter can see that r-sprk-01 contributed 2.06 and sprk another 2.06. A cosine distance between two 384-dimensional vectors has no such breakdown. When a reviewer asks why a passage was retrieved, a lexical match is an answer they can check.
Audits are the third. A regulator or an internal reviewer may ask for every passage that mentions a rule id. That is a keyword query with a complete answer, and it should be served by an index that returns all matches, not by a nearest-neighbor search that returns the closest k.
In one breath#
WHERE with a btree finds exact values fast and completely, and it cannot rank by resemblance. LIKE matches characters, reads every row for a leading %, and returns zero rows for UW-R01. Full-text search matches normalized words through an inverted index, and BM25 ranks rare words in short texts, which puts R-SPRK-01 first and R-ROOF-03 fourth for the paraphrase. Every rung matches words, so none of them can connect two texts that mean the same thing in different words.
The agent can now filter exactly and find identifiers reliably, and it still cannot find the roof-conflict rule from a paraphrase or the precedents whose rationales use other words. To compare meaning instead of words, a text has to become something with a distance: a list of numbers. The next page, vectors, builds that idea with no model at all, three rows and a pencil.