Emanuele Di RosaNOTES · CTO · AI RESEARCHER · INVENTOR

Notes · 6 October 2026 · 8 min read

From LSA to LLMs: twenty years of teaching machines meaning

In 2004 I built a chatbot that chose its answers by geometry rather than by keywords. Here is what carried over into today’s language models, what did not, and why I still keep one foot in formal methods.

How LSAbot chose an answer, 2004
1 · TERMS × ANSWERS ROWS: WORDS · COLUMNS: ANSWERS how often each word appears in each answer of the knowledge base SVD 2 · TRUNCATED SVD · KEEP k DIMENSIONS U Σ Vᵀ k ≪ VOCABULARY SIZE · TYPICALLY 100–300 words that occur in similar answers end up close together in the k dimensions PROJECT 3 · SEMANTIC SPACE · COSINE θ ANSWER 1 ANSWER 2 ANSWER 3 QUESTION ANSWER 4 CHOSEN chosen: the answer whose vector makes the smallest angle with the question
Latent Semantic Analysis, as LSAbot used it: counts become a matrix, the matrix is factorized and truncated, and meaning becomes a direction in a space with far fewer dimensions than the vocabulary. No hand-written rules, no exact keywords, just an angle.

A chatbot that measured angles

In 2004, for my Computer Engineering thesis at the University of Palermo, I built LSAbot. The chatbots of the day matched keywords against hand-written rules, and they broke the moment a user chose a different word. I wanted one that would answer a question it had never seen phrased that way.

The tool was Latent Semantic Analysis, a method from information retrieval. You count how often each word appears in each candidate answer, factorize that matrix with a singular value decomposition, and keep only the strongest dimensions, usually a few hundred. Words that keep company with the same other words end up close together, so “price” and “cost” land near each other even though no rule says they should. A user’s question is projected into the same space, and the answer whose vector makes the smallest angle with it is returned.

similarity(question, answer) = cos θ = (q · a) / (‖q‖ ‖a‖)

That was the whole trick: meaning as a direction, similarity as an angle. The project was titled “LSAbot: the chat-bot that understands and learns”, and it could answer questions phrased in words nobody had matched in advance, because it did not depend on hand-written rules or exact keywords. In 2005 it won the Targa Under 30 at the first Pier Giorgio Perotto Innovation Award, the prize named after the engineer behind the Olivetti Programma 101. It is the reason I say I have been working on natural-language AI since 2003.

What LSA got right

The idea that a word is defined by the company it keeps is older than any of this software. What LSA showed, and what LSAbot showed me, is that the idea is computable: you can build the geometry from text alone and it works.

That geometry never went away. In 2013, word2vec learned word vectors from prediction instead of counting, and the vectors were better. In 2017 the transformer replaced the fixed vector with one recomputed for every token in context, and in 2018 BERT made those contextual vectors the standard starting point for almost every language task. The models behind today’s assistants still turn text into vectors at every layer, and they still compare them with dot products. The scale changed by many orders of magnitude. The instinct did not.

Meaning is geometry. That part I got in 2004, and it has not needed revising.

Two timelines, 2003 to 2026
THE FIELD LSA ITSELF: 1990, DEERWESTER ET AL. word2vec2013 Transformer2017 BERT2018 ChatGPT2022 LLM agents2026 ME LSAbot thesis2004 · PEROTTO AWARD 2005 PhD · automated reasoning2008–10 · GENOA · CORK 4C IEEE paper · museum systems2013 · ETT Applied NLP · EVALITA wins2016–20 · APP2CHECK · CHATBOT PATENT AIDA Agents · FOL red-teamingoptimization patent issued2026 · DATAMUNDI 2005 2010 2015 2020 2025
Both lanes share the ruler at the bottom, and events sit at the middle of their year. The field’s dates are the usual ones: word2vec in 2013, the transformer in 2017, BERT in 2018, ChatGPT in late 2022. Mine are linked in the receipts below.

What it got wrong

Almost everything else. LSA ignores word order, so “the bank approved the loan” and “the loan approved the bank” are the same vector. It is linear, so it cannot represent a word that means two things. It could only choose among answers that already existed.

The knowledge base was the real limit. Every answer LSAbot could give had to exist before the conversation started. A modern model generates the answer, and it learned its geometry from more text than any person will read. The inspectability went the other way, though. LSAbot’s space was small enough to examine, and the factorization behind it could be reasoned about. A language model has billions of parameters and behaviour that has to be measured rather than derived.

What carried over, what did not
LSA, 2004VerdictLLMs, 2026

Meaning as geometryWords and sentences are vectors; similarity is an angle.

KEPT

Embeddings everywhereEvery layer of a transformer does the same job, at scale.

Learned from countsOne linear factorization of a term-by-document matrix.

REPLACED

Learned from predictionGradient descent on the next token, over billions of parameters.

Bag of wordsOrder ignored; context lost.

REPLACED

AttentionEvery token sees the whole sequence; order and context matter.

Chooses an existing answerOnly what somebody already wrote.

REPLACED

Generates the answerNew text, including text nobody wrote.

InspectableA small space and a factorization you can reason about.

LOST

OpaqueBehaviour has to be measured; guarantees have to come from outside the model.

Five properties of the 2004 system and where they stand now. The last row is the one this note is really about.

The detour that was not a detour

After LSAbot I did not go deeper into language. I went to the other side of AI: a PhD in automated reasoning at the University of Genoa with Enrico Giunchiglia, and a stay at the Cork Constraint Computation Centre with Barry O’Sullivan. SAT solving, optimization under preferences, and the automatic generation of high-quality test cases and plans.

That is the formal side of the field, where an answer comes with a proof rather than a probability. It felt like leaving language behind. It turned out to be the training that makes my language work different now.

In between I learned to ship. At ETT I coordinated the team that built interactive museum systems, and we wrote them up at the IEEE Digital Heritage congress in 2013. At App2Check I went back to language with far better tools: our sentiment and aspect systems won all three tasks at ATE_ABSITA 2020 and placed second in irony detection at SENTIPOLC 2016 by 0.0068, and EVA, a chatbot that built its own knowledge base from unstructured text, became a patented method. That was the 2004 problem again, approached differently: the knowledge base LSAbot had to be given, EVA extracted from the text itself.

The formal training came from the PhD. The machine-learning side I kept adding through courses, starting with Andrew Ng’s Machine Learning at Stanford.

Certifications, 2014 to 2022
Machine LearningSTANFORD UNIVERSITY · PROF. ANDREW NG4 JUN 2014via CourseraVERIFY ↗ Deep Learning Specializationfive courses · Prof. Andrew Ng31 MAR 2018DeepLearning.AI, via CourseraVERIFY ↗ AI-First Product LeaderBecoming an AI-First Product Leader28 DEC 2020LinkedIn Learning · PMIVERIFY ↗ Agile Project ManagementGoogle certificate5 DEC 2021via CourseraVERIFY ↗ Data Analysis Using PySparkguided project16 FEB 2022via CourseraVERIFY ↗
Dates as recorded on my CV; spacing is not to scale. Each Verify link opens the certificate. The Stanford course came first, and the Deep Learning Specialization, from the same instructor, followed four years later.

Why the formal side still matters

Language models learned the geometry better than anything I could have built. What they did not learn is a guarantee. My 2026 work is about putting the guarantees back from the outside, with the tools from the detour.

One result makes the point. Take a sensitive question a model declines to answer. Re-encode it deterministically in first-order logic, with no language model in the transform, and ask the same model to reason over the formula. Across fourteen frontier models from four providers, commitment rose from 19.8% of direct questions to 48.1% under the symbolic encoding. The paper’s explanation is that safety training was learned mostly on natural-language surface patterns and does not generalize to formal contexts, while the reasoning does. It is a reproducible finding, which is rare for red-teaming, and it comes straight from treating a model as a system to be tested formally rather than a black box to be prompted.

The same question, two encodings
A sensitive questionSAME CONTENT, TWICE Asked in natural language LLM DeclinesCOMMITS 19.8% Re-encoded infirst-order logic DETERMINISTIC · NO LLM IN THE TRANSFORM Same LLM Commits48.1% 14 FRONTIER MODELS · 4 PROVIDERS · N = 672 PAIRED EXPERIMENTS · SAFETY-BYPASS RATE 37.2%
From my paper presented at the PANDORA workshop at EMNLP 2026, in Budapest; the numbers are from the paper. The encoding is rule-based and hash-chained, so anyone can reproduce the exact prompts.

The other half of the same idea is optimization. When a recommendation has to respect hard constraints as well as preferences, a language model can propose, but it cannot promise. A solver can. The method behind my US Patent 12,717,799 B2 computes the provably optimal result under both, and the product built on it pairs the two: the model for understanding, the solver for the guarantee.

Meaning is geometry. Trust is proof. It took me twenty years to want both in the same system.

If I could send one note back to the 2004 version of me, hunched over a term-document matrix, it would be this: the angle was the right idea, keep it. Then go and learn how to prove things, because one day the models will be so good at meaning that proof will be the only thing left to add.

The receipts

Every claim above links to a public record.

2004 to 2013

  • Pier Giorgio Perotto · the award’s namesake; the prize’s background page is at Premio Perotto. LSAbot, Targa Under 30, 2005.
  • PhD thesis · Automatic Generation of High-Quality Test Cases and Plans in Software Testing and Automated Planning, University of Genoa.
  • IEEE Digital Heritage 2013 · “Excavate and learn”: Enhancing visitor experience with touch and NFC, with Fabrizio Benente, at ETT.

App2Check years

Now