where the models go
Where the models go
These three tools ran on my cheap laptop. No graphics processing unit (GPU), a generation takes minutes, and the larger model costs about three times the smaller one. That makes where you put a model — and whether you put one there at all — an engineering decision rather than a taste.
The standard approach
The first tool, gigi, is the shape you
would expect: embed documents and questions with a small multilingual
encoder, retrieve by cosine similarity
with maximal marginal relevance (MMR) for diversity, grade the candidates,
and ask a local model to write one answer. A cross-encoder reranker sits in
the middle because that is what you do.
A 288-configuration grid over the fixture corpus said otherwise. Reranking lowered mean reciprocal rank from 1.000 to 0.644 and answer basis from 1.000 to 0.604. On the composite score the paired bootstrap put the difference at [+0.065, +0.206] with p = 1.00 in favour of leaving it out. I removed the component; the encoder stayed. A model earned its place by being deleted.
Enter a knowledge graph
The second tool, acciughe, began as
a product file. Its hypothesis was that a graph of what the notes hold —
entities, relations, clusters — could
answer the questions a folder of text cannot, those spanning notes written
years apart, and describe the corpus too. It was marked tentative and
expected to be revised. What shipped was a co-occurrence graph built from
stopwords, a bounded walk over it, and one model call at the end to phrase
the answer. The model does not choose which note to read; the graph does,
and that is why the structure can be inspected.
When the walk cannot support a claim, the command refuses rather than writing one. The summary became a count of the words more than one note holds: a sentence about a whole corpus has no citations, and this was a tool whose one rule was that every claim points at a note. A guard checks the quotes behind an answer; it catches fabrication, not relevance.
The product file stayed where it was written and eventually stopped describing the code; the tests became the specification. On the next project I kept the document current as measurements arrived.
An experimentation discipline
The third tool, grappoli, asks for
no answer at all. It produces a map of a branch too large to read: regions,
what each one is about, and how they
touch. Every choice in it is a hypothesis with a measurement attached.
The map is pure arithmetic. Embeddings, cosine similarity, a k-nearest-neighbour graph, community detection. No model call builds it. I kept term frequency–inverse document frequency (TF-IDF) alongside the encoder as a control, and the encoder earned its keep: adjusted Rand index (ARI) 0.904 and 1.000 on two fixtures against TF-IDF’s 0.435 and 0.494. One model wrote the region descriptions, one call per region, prompted with that region’s notes only.
The two generators needed telling apart. Asked to judge their descriptions, the smaller model flagged ten claims, every one a sentence lying verbatim in the notes. A cross-encoder trained on entailment, decoupled from the model it judged, scored them level on average — 0.762 against 0.772. The relation step separated them: asked one pair at a time, the smaller model wrote about one region where a relation between two belonged; the larger one wrote the relation, at about three times the generation cost.
Choosing the work was the other experiment. A conversation where the model chose its tools returned no relations in six cells; naming the pair and asking one local question per call returned a valid relation in all eighteen. I bought relations that exist and gave up the model’s choice.
What the three share
Language was the other constant. gigi moved to a multilingual encoder and
a golden set in four languages. acciughe tried deriving stopwords from
corpus frequencies rather than keeping lists; the machinery grew and the
result did not justify it. grappoli inherited the lists. Its
mixed-language fixture is the edge of what has been scored: adjusted Rand
index −0.044, with no setting above 0.212, the encoder grouping by language
where the reference groups by topic. That is a limit of the record, not a
result about the corpus the tool was built for.
In all of them, every model instance is an encoder, a generator or a judge, and each has a measured reason for sitting where it does — including the ones I took out. The reranker, the whole-map conversation and the self-judge each gave way to simpler parts that could be checked. Each project keeps a file of what is still undecided and the measurement that would settle it. That file, more than the code, is where the decisions were made.