All customer data is encrypted at rest with AES-256 and in transit with TLS 1.3. Database backups are encrypted with a separate key hierarchy.
RAG knowledge assistant
Answers grounded in your docs, with receipts.
Ask a question and get an answer built only from retrieved sources: hybrid search, live relevance scoring, inline citations, and an honest refusal when the docs don’t cover it.
- Runs in your browser
- No sign-up
- No API key
Filed underismydataencryptedatrest
All customer data is encrypted at rest with AES-256 and in transit with TLS 1.3.
That isn’t covered in the docs, so I won’t guess. Grounded-only generation means no source, no answer.

Export all of your data as JSON or CSV from Settings, then Data, then Export. Large exports are prepared in the background and emailed as a download link.
Data can be pinned to the US, EU, or APAC region. The region is chosen when a workspace is created and cannot be changed afterward.
All twelve drawers searched. No card shares a single term with this question, so nothing leaves the cabinet.
cosine, TF-IDFterm 0.06, phrase 0.08title 0.15termkeyword matchcite line 0.12
How it works
Three steps, run in your browser over a twelve-card sample catalogue. No server, no API key.
File the question
Stop words drop out. What is left is stemmed, so retries and retried file under one heading, and a few synonyms in the docs’ own words are added. The terms are weighted by TF-IDF into a query vector.
Pull the cards
Every card is scored: cosine similarity, plus 0.06 for each shared term, 0.08 for each shared phrase and 0.15 when a term names the card’s title. The top three leave their drawers.
Cite or refuse
The reply quotes the best sentence of each card and footnotes it. If no card reaches 0.12, nothing is written.
What it does
The house rules of the reading room.
Librarian is retrieval-augmented generation reduced to its honest core: find the passages that answer the question, show how they were found, and quote them. Four rules keep it that way.
Notice
Every claim carries a footnote.
Each sentence of a reply is quoted from a card, and its footnote lifts that card out of the tray with its score beside it.
No card, no answer.
When nothing clears the cite line, the reply is a refusal stamped Not in the stacks. It never guesses from what it half remembers.
The arithmetic is on the card.
Cosine, term, phrase and title parts are printed under every pulled card, so anyone can check why it was chosen.
Bring your own text.
Paste notes or an article in the console. It is cut into cards, filed in the cabinet and searched in your browser; nothing is sent anywhere.
The architecture
The route of a question.
Five stations, one TypeScript module, no server. Followed here with a real question from the catalogue; every figure on this plate is computed by the same code the console runs.
Analyzer
analyze()Stop words and filler verbs drop out, the rest are stemmed with Porter’s rules, and a synonym map of 5 entries adds the docs’ own words (SSO also looks for single sign-on).
howdowebhookshandleretriesIndex
buildIndex()The twelve cards are filed under 142 distinct terms. Rare terms weigh more: a term on one card outranks one on four.
term cards idf webhook 1 2.872 retri 1 2.872 Scorer
scoreAll()Cosine over TF-IDF vectors, plus 0.06 for every shared term, 0.08 for every shared two-word phrase and 0.15 when a term names the card’s title. The top 3 leave their drawers.
webhooks.md0.341 cos + 0.120 match + 0.150 title= 0.611
The other 11 cards: 0.000, no shared term.
Cite line
retrieve()If the best card is under 0.12, the run ends here with a refusal. Nothing below this line is ever guessed.
“How do webhooks handle retries?”0.611 ≥ 0.12Write
“What is the meaning of life?”0.000 < 0.12Not in the stacks
Writer
bestSentence()The reply is extractive: the sentence whose matched terms carry the most weight is quoted and footnoted. A term that only names the card’s title counts for a quarter, so the retry line wins over the signature line.
Failed deliveries are retried with exponential backoff for up to 24 hours1.1 webhooks.md, card 7
lib/retrieval.ts, covered by a test for every sample question.Colophon
Librarian was set, ruled and bound in the browser. No model is called and no server answers: the whole reading room is a static page and about four hundred lines of retrieval code.
- Framework
- Next.js 16, App Router, statically rendered
- Interface
- React 19, server-rendered, the reading room as a client island
- Language
- TypeScript, strict
- Styling
- Tailwind CSS 4 and hand-ruled CSS, no color
- Retrieval
- TF-IDF, Porter stemmer and hybrid scorer, written from scratch
- Tests
- Vitest: one test per sample question
- Type
- Fraunces, Libre Franklin, IBM Plex Mono
- Hosting
- Netlify
Further reading
The case study is on loan.
The write-up of Librarian lives on rikenpatel.work, beside the rest of Riken Patel’s work in AI and mobile engineering.
The console
The reading room is open.
Ask the twelve cards anything, change the house rules and watch the scores move, or file your own text into the cabinet. It all runs in your browser.
Launch console