❦
Under the Patronage of the Curious Public · Admission Free · Anno MMXXVI

The Grand ExpositionofMechanical Memory

Being a working demonstration of how a thinking engine may be assembled from a Sentence Transformer and a Hall of Vectors — wherein six celebrated scientific romances are distilled into 3,389 passages, each rendered as 384 numbers, and consulted as an oracle.

WELLS · VERNE · SHELLEY
❦
✦ THE GRAND CIRCUIT RAILWAY ✦

As at the great fairs, the railway rings the grounds. Here it carries the whole journey of a thought in one endless circuit — ingested, enriched, embedded, extracted — and what returns as an answer departs again as a question. Watch a lap; the cargo tells the story.

wander onward: put a question to , or work the enrichment engine yourself at .

✋ THE VISITOR'S BENCH — WORK THE ENRICHMENT ENGINE YOURSELF ✋

The expositions of old let you pull the levers and drive the motorcars. Pull this one: the works will draw a passage from the stacks, the clerk-engine will propose its catalogue line, and you may correct it with your own hand before it is stamped — then see where your bale settles in the hall.

PULL
TURNS OF ENRICHMENT
WORKED BY VISITORS
0
The works stand ready. Pull the lever to draw a passage from the stacks.

Corrected lines are kept in the visitors' ledger — the human hand in the machine's training.

0%

The Machinery Is Being Brought to Pressure

  • Decanting the corpus — six novels, 3,389 passages
  • Charging the vector hall — ruvector, compiled to WebAssembly
  • Awakening the transformer — MiniLM, six layers, ONNX

Stoking the boilers…

❧ PUT YOUR QUESTION TO THE ENGINE ☙
THE PROGRAMME —
✥ THE MACHINE FLOOR — OBSERVE THE MECHANISM AT WORK ✥
I

Tokenisation

Your words are cut into the engine's alphabet.

II

The Transformer

Six layers of attention press the sentence into a single vector of 384 numbers.

III

The Vector Hall

The vector is walked through a small-world graph of 3,389 passages.

IV

The Assembly

The nearest testimony is weighed, sentence by sentence, into a pronouncement.

✦ THE ORACLE SPEAKS ✦
Upon the inquiry: “”

— composed verbatim from the exhibits below; the engine invents nothing.
⚙ THE ANNEX · NEWLY OPENED — THE COMPOSING ENGINE ⚙
Wherein a second transformer — a decoder, LaMini-Flan-T5, 248 million weights — first imagines what an answer might sound like to sharpen the search (the HyDE manoeuvre), then reads the refined testimony and writes its answer anew, word by word, in your browser.

— machine-composed prose, conditioned on the exhibits; trust the quotations above first.
❧ RETRIEVED FROM THE STACKS ☙
✥ HOW THIS MACHINE THINKS ✥

A modern language model is, at heart, two machines. The first — a transformer — turns meaning into geometry. The second — a vector index — makes that geometry searchable. This exposition wires the two together before your eyes; what it deliberately omits is the third machine, the generative decoder, which would write new prose rather than quote the corpus. Memory first; invention later.

① THE CORPUS 6 novels, 1818–1898 2.2 million characters public domain ② PASSAGES 3,389 chunks ~900 characters each one-paragraph overlap ③ THE TRANSFORMER all-MiniLM-L6-v2 6 attention layers · 22 M weights ONNX, 8-bit, in your browser meaning → geometry ④ THE VECTORS 3,389 × 384 numbers nearness = kinship of meaning ⑤ THE VECTOR HALL ruvector · Rust → WASM small-world graph (HNSW) k-nearest in milliseconds geometry → recall ⑥ THE ANSWER sentences ranked against the query, cited, assembled

Context at the gate

Before embedding, the decoder walked each novel start to finish, writing a one-line running summary for every passage — "the narrator sees a Martian fighting-machine, a monstrous tripod…" — so that a passage which says only "the Thing" is filed under what the Thing is. Librarians call it cataloguing; engineers call it contextual retrieval. It is how pronouns find their referents.

The Constellations

No one told the machine what the books are about. Clustering the vectors themselves gathers kindred passages into constellations — and the decoder, shown three specimens of each, writes the plaque. Themes emerge from geometry alone: that is the quiet miracle the star-map above renders visible.

One geometry, many catalogues

The Catalogue (narrative order), the Constellations (theme), and the Orrery (raw geometry) are not three indexes but three readings of one HNSW vector store. Structure and topic ride along as sidecar registries keyed to the same vector identities — overlays on a single memory, the way a library holds one set of books under many card catalogues.

Why it works

The transformer was trained on a billion sentence-pairs to place kindred meanings near one another in a 384-dimensional space. “Heat-ray” and “fighting-machine” land close together though they share no letters. Search, therefore, is not matching words — it is measuring distance between thoughts.

What the hall does

Comparing your question against every passage would take 3,389 × 384 multiplications per candidate. The HNSW graph instead hops between neighbours — a few dozen comparisons, logarithmic in the size of the library — the same species of index that serves the largest engines of the age, here compiled to 46 kilobytes of WebAssembly.

The third machine — the Annex

A full LLM adds a decoder: the same attention machinery, run in reverse to write new sentences conditioned on what was retrieved. The Annex demonstrates it — a second transformer that composes prose from the exhibits. Mark the difference in kind: the Oracle's quotations can be traced word-for-word to the corpus; the Annex's prose is generated, fluent and usually faithful, but no longer a citation. That trade — fluency against traceability — is the central bargain of every modern language model.

6
novels
3,389
passages
384
dimensions
1.1 M
numbers in the hall
270 M
weights, two transformers
0
calls to any cloud