Every "chat with your documents" feature, every smart search box and most recommendation lists use the same trick underneath. This page lets you poke at that trick with a tiny model built for this page. The model is honest but simplified: it uses 8 readable scores per phrase, where a real model learns hundreds or thousands of unreadable ones. The behaviour is the same.
01 · The idea
Words become coordinates.
An embedding model reads a piece of text and returns a list of numbers. Each number is a position on one axis, so together they place the text somewhere in a space with many directions. Squash those numbers down to two and you can draw the text as a dot. Pick a customer message and watch it travel.
The text
"Boiler makes a banging noise"
8 numbers, 0 to 1
One place on the map
Lands near: Heating
a real model makes about 1,536 numbers, and none of them has a name
Show as text
| Text | The 8 numbers | Lands near |
|---|---|---|
| Boiler makes a banging noise | roof 0.00, plumbing 0.20, kitchen 0.00, garden 0.00, heating 0.90, floors 0.00, urgent 0.35, other 0.00 | Heating |
| Lay a new lawn | roof 0.00, plumbing 0.00, kitchen 0.00, garden 0.90, heating 0.00, floors 0.00, urgent 0.00, other 0.00 | Garden |
| Dripping kitchen tap | roof 0.00, plumbing 0.85, kitchen 0.35, garden 0.00, heating 0.00, floors 0.00, urgent 0.10, other 0.00 | Pipes and taps |
You cannot read the numbers. You can measure the distance between them, and that is all search needs.
02 · The map
Similar meaning lands close together.
Here are 40 invented household jobs, each placed by its numbers. Watch them find their spots: the groups form on their own, and the circles and names are drawn on afterwards. Pick a job, or point at any dot, to see its three nearest neighbours.
Picked job
"Toilet keeps running"
Sits in: Pipes and taps
Its 3 nearest
- Shower drains very slowly0.97
- Low water pressure upstairs0.97
- Dripping kitchen tap0.92
squeezing 8 numbers onto flat paper bends a few distances; the lines follow the real score
Show all 40 jobs as a table
| Job | Sits in | Three nearest |
|---|---|---|
| Roof tiles blew off in the storm | Roof and gutters | Leak in the attic after heavy rain (0.95); Flat roof needs a new coating (0.88); Downpipe came loose from the wall (0.88) |
| Gutter is full of leaves | Roof and gutters | Moss growing all over the roof (0.99); Flat roof needs a new coating (0.90); Chimney needs repointing (0.87) |
| Flat roof needs a new coating | Roof and gutters | Chimney needs repointing (0.97); Moss growing all over the roof (0.94); Gutter is full of leaves (0.90) |
| Leak in the attic after heavy rain | Roof and gutters | Downpipe came loose from the wall (0.97); Roof tiles blew off in the storm (0.95); Water dripping from the ceiling (0.87) |
| Chimney needs repointing | Roof and gutters | Flat roof needs a new coating (0.97); Moss growing all over the roof (0.90); Gutter is full of leaves (0.87) |
| Moss growing all over the roof | Roof and gutters | Gutter is full of leaves (0.99); Flat roof needs a new coating (0.94); Chimney needs repointing (0.90) |
| Downpipe came loose from the wall | Roof and gutters | Leak in the attic after heavy rain (0.97); Roof tiles blew off in the storm (0.88); Flat roof needs a new coating (0.87) |
| Dripping kitchen tap | Pipes and taps | Washing machine hose leaks (0.98); Toilet keeps running (0.92); Shower drains very slowly (0.91) |
| Toilet keeps running | Pipes and taps | Shower drains very slowly (0.97); Low water pressure upstairs (0.97); Dripping kitchen tap (0.92) |
| Burst pipe under the sink | Pipes and taps | Water dripping from the ceiling (0.86); Washing machine hose leaks (0.85); Toilet keeps running (0.80) |
| Shower drains very slowly | Pipes and taps | Toilet keeps running (0.97); Low water pressure upstairs (0.97); Dripping kitchen tap (0.91) |
| Water dripping from the ceiling | Pipes and taps | Leak in the attic after heavy rain (0.87); Burst pipe under the sink (0.86); Downpipe came loose from the wall (0.85) |
| Low water pressure upstairs | Pipes and taps | Toilet keeps running (0.97); Shower drains very slowly (0.97); Dripping kitchen tap (0.90) |
| Washing machine hose leaks | Pipes and taps | Dripping kitchen tap (0.98); Toilet keeps running (0.92); Shower drains very slowly (0.90) |
| New kitchen worktop | Kitchen | Replace all kitchen cabinet doors (1.00); Fit a new oven and hob (0.99); Complete kitchen renovation (0.97) |
| Replace all kitchen cabinet doors | Kitchen | New kitchen worktop (1.00); Fit a new oven and hob (0.99); Complete kitchen renovation (0.97) |
| Fit a new oven and hob | Kitchen | Replace all kitchen cabinet doors (0.99); New kitchen worktop (0.99); Complete kitchen renovation (0.97) |
| Tiles behind the stove are cracked | between Kitchen and Floors and tiles | Complete kitchen renovation (0.83); Squeaky floorboards on the landing (0.71); New kitchen worktop (0.71) |
| Install a dishwasher | Kitchen | Complete kitchen renovation (0.93); Fit a new oven and hob (0.93); New kitchen worktop (0.92) |
| Complete kitchen renovation | Kitchen | New kitchen worktop (0.97); Replace all kitchen cabinet doors (0.97); Fit a new oven and hob (0.97) |
| Hedge needs trimming | Garden | Build a wooden fence (1.00); Lay a new lawn (1.00); Tidy the garden before summer (0.99) |
| Lay a new lawn | Garden | Hedge needs trimming (1.00); Build a wooden fence (1.00); Tidy the garden before summer (0.99) |
| Build a wooden fence | Garden | Hedge needs trimming (1.00); Lay a new lawn (1.00); Tidy the garden before summer (0.99) |
| Tidy the garden before summer | Garden | Build a wooden fence (0.99); Hedge needs trimming (0.99); Lay a new lawn (0.99) |
| Patio stones are loose | Garden | Hedge needs trimming (0.81); Lay a new lawn (0.81); Build a wooden fence (0.81) |
| Cut down a dead tree | Garden | Tidy the garden before summer (0.97); Hedge needs trimming (0.94); Lay a new lawn (0.94) |
| Boiler makes a banging noise | Heating | Radiators stay cold (1.00); Thermostat shows the wrong temperature (0.95); Bleed the radiators (0.93) |
| Radiators stay cold | Heating | Boiler makes a banging noise (1.00); Thermostat shows the wrong temperature (0.97); Bleed the radiators (0.95) |
| Yearly boiler service | Heating | Bleed the radiators (1.00); Thermostat shows the wrong temperature (0.99); Radiators stay cold (0.95) |
| Install underfloor heating | between Heating and Floors and tiles | Yearly boiler service (0.76); Bleed the radiators (0.76); Thermostat shows the wrong temperature (0.75) |
| Thermostat shows the wrong temperature | Heating | Yearly boiler service (0.99); Bleed the radiators (0.98); Radiators stay cold (0.97) |
| No hot water since this morning | Heating | Boiler makes a banging noise (0.88); Radiators stay cold (0.84); Not urgent, any time this year is fine (0.78) |
| Bleed the radiators | Heating | Yearly boiler service (1.00); Thermostat shows the wrong temperature (0.98); Radiators stay cold (0.95) |
| Sand and varnish the wooden floor | Floors and tiles | Squeaky floorboards on the landing (1.00); Lay laminate in the bedroom (1.00); Cracked tiles on the bathroom floor (0.96) |
| Cracked tiles on the bathroom floor | Floors and tiles | Regrout the shower walls (0.99); Sand and varnish the wooden floor (0.96); Lay laminate in the bedroom (0.96) |
| Lay laminate in the bedroom | Floors and tiles | Sand and varnish the wooden floor (1.00); Squeaky floorboards on the landing (1.00); Cracked tiles on the bathroom floor (0.96) |
| Squeaky floorboards on the landing | Floors and tiles | Sand and varnish the wooden floor (1.00); Lay laminate in the bedroom (1.00); Cracked tiles on the bathroom floor (0.96) |
| Regrout the shower walls | Floors and tiles | Cracked tiles on the bathroom floor (0.99); Squeaky floorboards on the landing (0.92); Sand and varnish the wooden floor (0.92) |
| Not urgent, any time this year is fine | the middle (no topic stands out) | Urgent: help needed today (0.99); Burst pipe under the sink (0.78); No hot water since this morning (0.78) |
| Urgent: help needed today | the middle (no topic stands out) | Not urgent, any time this year is fine (0.99); Burst pipe under the sink (0.78); No hot water since this morning (0.76) |
Nobody labelled these groups. They appear because similar requests get similar numbers.
03 · Search
Search means finding the nearest neighbours.
A question gets turned into numbers the same way. Put it in the middle, place every job at its distance from the question, and grow a circle until it holds five. The score runs from 0 (nothing in common) to 1 (same direction). Pick a question, and try the last one too.
The question
"My roof is leaking"
The 5 nearest, with score
- Leak in the attic after heavy rain1.00
- Downpipe came loose from the wall0.96
- Roof tiles blew off in the storm0.96
- Water dripping from the ceiling0.87
- Gutter is full of leaves0.84
Left out, 6th: 0.84
best score is low: nothing here is about cars, and you still get five answers
Show as text
| Question | The 5 nearest jobs, with score | Left out, 6th |
|---|---|---|
| My roof is leaking | 1. Leak in the attic after heavy rain (1.00); 2. Downpipe came loose from the wall (0.96); 3. Roof tiles blew off in the storm (0.96); 4. Water dripping from the ceiling (0.87); 5. Gutter is full of leaves (0.84) | Flat roof needs a new coating (0.84) |
| Water is coming through the ceiling | 1. Water dripping from the ceiling (1.00); 2. Burst pipe under the sink (0.89); 3. Leak in the attic after heavy rain (0.83); 4. Downpipe came loose from the wall (0.82); 5. Toilet keeps running (0.77) | Washing machine hose leaks (0.75) |
| Garden needs work before summer | 1. Tidy the garden before summer (1.00); 2. Build a wooden fence (0.99); 3. Hedge needs trimming (0.99); 4. Lay a new lawn (0.99); 5. Cut down a dead tree (0.97) | Patio stones are loose (0.81) |
| The house will not warm up | 1. Radiators stay cold (0.99); 2. Boiler makes a banging noise (0.99); 3. Thermostat shows the wrong temperature (0.96); 4. Yearly boiler service (0.92); 5. Bleed the radiators (0.92) | No hot water since this morning (0.86) |
| Kitchen makeover | 1. Complete kitchen renovation (1.00); 2. New kitchen worktop (0.99); 3. Replace all kitchen cabinet doors (0.99); 4. Fit a new oven and hob (0.98); 5. Install a dishwasher (0.92) | Tiles behind the stove are cracked (0.81) |
| My car will not start | 1. Urgent: help needed today (0.36); 2. Not urgent, any time this year is fine (0.34); 3. Burst pipe under the sink (0.27); 4. No hot water since this morning (0.25); 5. Water dripping from the ceiling (0.23) | Roof tiles blew off in the storm (0.18) |
For "My car will not start" the best score is 0.36. Nothing on the map is about cars, but the search still hands back five results. Your product has to decide what to do with a weak best match.
Search always returns something. A low top score is the only hint that nothing really matches.
04 · Cutting text
How you cut the text changes what you find.
Documents are cut into pieces (chunks) before they get numbers. One customer wrote about two jobs in one message. Kept whole, the message lands halfway between both topics and matches neither search well. Cut per sentence, each piece lands right next to the search it answers.
The customer's message
Our boiler makes a banging noise every morning.
Also, could someone look at the cracked tiles on the bathroom floor?
Distance to each search: 1 minus the score
Best score per search
- "Heating engineer needed" one chunk0.75 per sentence0.99
- "Bathroom tiler needed" one chunk0.68 per sentence1.00
Show as text
| How the message is cut | Heating engineer needed | Bathroom tiler needed |
|---|---|---|
| One chunk | 0.75 | 0.68 |
| One chunk per sentence | 0.99 (sentence 1) | 1.00 (sentence 2) |
The message: "Our boiler makes a banging noise every morning. Also, could someone look at the cracked tiles on the bathroom floor?" As one chunk it is about two things, so its numbers sit halfway between heating and floors. It matches both searches only so-so, and might lose to a message about one thing. Per sentence, each search finds a strong match.
Chunking is a product decision: it decides which questions can find which answers.
05 · Limits
Close is not the same as correct.
Embeddings capture what text is about, not what it says is true. Pick a pair from the map that sits close for the wrong reasons, and compare their numbers. A third trap is not a pair: "Tiles behind the stove are cracked" sits between kitchen and floors, so either team could get it, unless you add a rule for who owns it.
Two messages
AWater dripping from the ceiling
BLeak in the attic after heavy rain
Their numbers, A above B
Score
0.87: very close
What each one needs
- A
- Often a pipe upstairs: a plumber
- B
- The roof: a roofer
Different trade
Show as text
| Pair | Score | What each one needs |
|---|---|---|
| "Water dripping from the ceiling" and "Leak in the attic after heavy rain" | 0.87 | A: Often a pipe upstairs: a plumber. B: The roof: a roofer. Different trade. |
| "Not urgent, any time this year is fine" and "Urgent: help needed today" | 0.99 | A: Any time this year. B: Today. Opposite. |
| "Tiles behind the stove are cracked" and "Complete kitchen renovation" | 0.83 | A: A tiler, an hour or two. B: A kitchen fitter, weeks of work. A different job. |
What helps: filter first (region, job type, customer), then rank by similarity. Or store the key facts as fields and look them up. That is the topic of the next explainers.
Use similarity to find candidates, then use filters and structure to pick the right one.