Footnote · project 10 · Go · Postgres pgvector · Ollama

Footnote

Every answer, with the exhibit that says so.


Footnote answers questions from a set of documents and shows its work. It stores the documents in Postgres, finds the passages most likely to hold the answer by meaning, and gives a small local model the top few to read. The model has to name the passage it used, or say "I don't know".

Test questions

✓ right answered from the passages – none correctly said "I don't know" ✗ wrong got it wrong

Findings

Every choice was made on questions about 10 articles. The numbers below come from the other 25, which weren't looked at until the end.

01Finding the passage

Search by meaning beats search by words

02Cutting the documents

Paragraphs make the best pieces

03Answering

Reading the passages turns guesses into answers

04Declining

Saying "I don't know" before asking only half works

05From the course

A model that grades its own passages helps; one that grades its own answers doesn't

06Limits

Where it still goes wrong

Every retrieval number, both question sets
07Running it

Three containers

Postgres with pgvector, Ollama with the two models, and the Go API. The API serves this page with a live question box.

scripts/get-data.sh
docker compose up -d db ollama && docker compose run --rm models
docker compose run --rm ingest && docker compose up -d api
curl -s localhost:8080/ask -d '{"question": "Who ruled Normandy?"}'