chloedb-arxiv: arXiv on ChloeDB
Reference, rendered from docs/chloedb/arxiv.md.
These docs describe release 0.3.11. The docs of main describe the code as it is now.
A demo. chloedb-arxiv shows what ChloeDB can do; it is not part of ChloeDB's releases or their promises. It is tested on a train of its own (the
Demosworkflow,.github/workflows/demos.yml), outside CI's required check, and the command center marks it as a demo (compatibility).
chloedb-arxiv is an explorer of every paper on arXiv: 3.25 million papers up to this week, the people who wrote them, the citations between them, about 1,100 topics found from what they say, techniques and domains, and a feed per reader that reads like a research newsletter. It is a program of its own, in Rust, that talks to chloedb-server over HTTP only, like the crawler and the spreadsheets, and the command center shows it as an app.
Everything it does is a query to ChloeDB, and each page shows the queries it ran and their times (SQL at the bottom right):
- Search by words and meaning at once. Titles and abstracts are ranked by BM25 and by the meaning of their text (a static embedding model on the server, no API call), fused by rank (
rrf), with typos corrected from the titles' own words and the query's synonyms (RAG, retrieval augmented generation). A query is read for what it says: a year (since 2023), a person (by Yann LeCun), a category (cs.IR), a kind (surveys of), an id. Facets (year, category, technique, domain, kind, people) come from the same query. A question is answered in a paragraph whose claims cite the papers they come from (llm()on the server). - What to read next is ChloeDB's recommender. Every paper a work cites is a reading event, 5.2 million of them, counted by
CREATE RECOMMENDER reading ON ax_events(...): what is read together, what is read after. A paper's Read next fuses those counts with PageRank from it over the citation graph (ppr(ax_cites, :id)) and the nearest papers by meaning. For you does the same from the papers a reader opens and keeps here, which are events of the recommender as soon as they are written. - People, topics, techniques, domains, categories and venues each have a page: papers a year, who leads, what rose, the people nearest a person in the coauthor graph (
ppr(ax_coauthors, :who)), a topic summed up from its papers with each claim cited. - What's rising, over a span the reader picks (a month, three, six, a year or two): the techniques, domains and topics whose share of papers grew most against the span before, and only where the growth is beyond chance.
- Gaps. Rising techniques that have barely reached a domain where the techniques most like them already work. Over the last three years a technique's papers are counted by domain and by area; its look-alikes are the techniques whose domain counts point the same way (cosine, with the domain in question left out), and its expected papers in a domain are its papers times the look-alikes' share of that domain. A gap is a domain with a quarter of the expected papers or fewer, where the technique and the domain both grow faster than the median, their areas overlap, and two of the three closest look-alikes use the domain more than arXiv does. A gap's page shows the few papers that already combine the two, what the look-alikes did in the domain, and the people who write on both. The list is about 320
GROUP BYqueries, kept for twelve hours (src/gaps.rs). - New topics. Topics that barely existed and now hold hundreds of papers, born in the last year, two or three. A topic's papers are counted by month over five years (one
GROUP BY topic, monthfor 150 topics at a time) and smoothed over three months; it was born in the first month its count reached a fifth of its peak, when the year before held an eighth of the peak or less, so an old topic that merely grew is not new. Each shows its curve with the month it was born, the papers that started it (its most cited from six months before to two after) and where it is now: rising, fading, at its peak or steady, from its share of arXiv's papers over the last six full months against the six before (src/born.rs). - How techniques spread. When each technique left the field it grew up in and reached the next, year by year, with the most cited paper of its first two years in each. A technique's papers are counted by primary category and year (one
GROUP BY pcat, yeareach); it reached a category in the first year with five or more papers there and a twentieth of its best year there, two years running. It grew up in the earliest of the categories that hold a twentieth of its papers, and earlier uses of the same words in small categories, often another meaning (a transformer in power systems), are left out. Pick a field to see what reached it and when (src/spread.rs). - Who coined it. Ask who coined chain of thought (or who first used, where does X come from): the answer names the papers that made the term known, the most cited early papers that use it in the sense of its most cited papers (the sense is their titles' meaning, so a 1996 solar physics paper that says chain of thought is set apart as another sense), the literal first use, the year it took off, and when it reached each area. A term in use before arXiv began says so.
- What to cite. Paste a draft's abstract and references (arXiv ids, DOIs, links or written-out titles): you get the papers others cite together with those references (the recommender's pair counts, normalised by both papers' counts) and those nearest to them by meaning, fused by rank, minus what you already cite, each with why it is there. On 15 papers of October 2026 (posted after the citation data, so their own lists are not in the counts), with a fifth of the references each one resolves hidden, it put 14 of the 72 hidden references in its first 30, against 7 for raw pair counts and the abstract, 3 for the abstract alone and none for PageRank over the citations.
- What is new here. On a paper's page: the three earlier papers it is closest to (those it cites first, then the most cited of the 40 nearest by meaning posted before it), and what it adds to each and shares with them, written once by
llm()and kept. - Trends and the atlas. Any words, compared as a share of each year's papers. The atlas places the topics on one map, near topics near, colored by arXiv area, sized by papers, a ring on those that grew most last year.
- Feeds you shape yourself. A feed says what you want in your words: topics, papers like some you name, categories, techniques, domains, people whose new papers always go in, words that keep a paper out, kinds (surveys, benchmarks, datasets, tools), how many papers, how many of one topic, for whom, and how much code, citations and known authors count. The papers an issue would hold are SQL and answer as the knobs move (no model is called). Write issue then reads each paper in full from its HTML page on arxiv.org (its sections, figures and tables) and explains it, so the issue can be read without opening the papers: an opening on what the week's papers share, a contents list, and for each paper in brief, the problem, the approach, the results with their numbers, the takeaway, the limits, the terms a newcomer needs, the one or two figures that explain it best (copied from the paper, with what to notice in each) and its main results table. A paper without an HTML version is explained from its abstract. While it writes, a screen follows it: the papers it chose, which one it is reading, explaining or copying a figure of, how long each took and about how long is left, with a line to smile at while arXiv's 15 seconds between pages pass; the page can be left and the screen comes back when the feed is opened again (
GET /v1/jobs/<id>holds the writer's phase, paper and steps). Each issue has a page, a Markdown copy for a newsletter and an RSS feed. A feed set to write itself writes its issue every Monday from 06:00 UTC, so its RSS brings each week's issue to a feed reader with no one pressing a button (an hourly round writes the feeds due, longest waiting first, six at a time; a reader has three such feeds). A feed's owner can share it with a team by a link: whoever opens it can change the feed and write its issues with no sign-in, the feed stays the owner's, and Stop sharing makes the link stop working (POST /v1/feeds/<id>/team); the shorter styles of a weekly research newsletter (a paragraph a paper, brief, bullets) remain. - Standing questions. Ask once (tell me when someone uses diffusion models for weather forecasting) and every new paper that answers it comes to you, on a page and in an RSS feed. Every hour the papers of the last week are searched for the question (all its words and most of them by BM25, and its meaning, fused by rank), and the fifteen closest not read for it yet go to the model in one call (
llm()on the server), which says for each whether it does what the question asks and why. Every verdict is kept, so a paper is read once per question and an hour with nothing new calls no model; a new question reads the closest papers of the last month at once. A reader keeps ten questions (src/watch.rs). - People to work with. On a person's page: the people whose work of the last four years is nearest theirs in meaning but who have never written with them or with anyone they write with, with the techniques each would bring, their papers nearest the person's work, and the shortest way to them in the coauthor graph (through people with the fewest papers, since a name with thousands is many people sharing it). Their eight newest and eight most cited papers of the last six years are one text; the 500 nearest papers are read and each author scores by their papers' ranks there (
src/collab.rs). - Who could review it. On a paper's page, or for a title and abstract pasted in with its authors: the people who know its subject (their papers among the 500 nearest to it in the last six years), with eight papers or more and one in the last three years, its authors and everyone who wrote with one of them in the last four years left out and named, each with their nearest papers and seniority.
- Rising people, on the Rising page: people whose first paper is at most five years old, by the citations to their papers of the last one or two years (two cited papers or more, of 20 authors or fewer), by area.
- Where someone's work went. A person's page shows their most used techniques year by year as a river, each band a technique and its width their papers using it that year.
- Code and data. The share of papers that link their code, year by year, in all of arXiv or an area; the repositories behind the most papers; the techniques whose papers share code most and least; the newest and most cited papers with code and those with models or data on Hugging Face (
src/code.rs).has:codein a search keeps only papers with code. - Labs. The organisations behind 2.5 million papers (78%), from the authors' affiliations in OpenAlex's public snapshot: the labs with the most papers of the last twelve months, those whose share of the papers grew most, who is moving into a technique (a button on its page), and a page per lab with its papers a year, what it is known for and moving into, who writes its papers, the labs and countries it writes with. A paper's page names its organisations. OpenAlex names organisations for fewer of the newest papers, so growth is a lab's share, not its count (
src/labs.rs). - Likely classics. Recent papers that look, in their first months, like the papers that went on to be the most cited 1% of their year and area, by area and by how recently they were posted, each with its chance against the usual 1% and what weighed most. A logistic regression per window (no citations yet, or the arXiv papers citing it in its first 3, 6 or 12 months) is trained on 2016 to 2021 on what was known then: early citations, the authors' earlier papers, how fast its category and techniques grew, team size, code and kind. On 2022, which it did not see, 33% of its top 1% with six months of citations were in the real top 1%, against 18% for ranking by early citations and the authors' record (
tools/classics.py, which writesax_classicsand the models' card;GET /v1/classics?area=&days=&sort=). - For and against. State a claim (LLMs can self-correct their reasoning without external feedback) and get the papers whose results support it, those that contradict it and those that find it holds only in some settings, each with the sentence of its abstract that shows it. The 40 papers nearest the claim are found by the words of its subject (all of them, and all but one) and by its meaning, fused by rank, and the model reads their abstracts against it ten to a call, all at once (
llm()on the server). A side counts only with a sentence that is in the abstract word for word (spacing, case and punctuation aside), and the answer is kept, so a claim asked again calls no model (src/claims.rs). - Explain at my level. A paper's page explains it for a student, a practitioner or an expert, each hard term of its abstract with its meaning at that level, the paper the field credits with the term (the earliest of its most cited papers on arXiv, as Who coined it reads it, or none when the words were in use before arXiv began) and a link to the full answer. The level is kept in the browser: topic summaries are written for it and a new feed's audience follows it. Each explanation is kept per level (
GET /v1/explain/<id>?level=). - From a reading list to related work. Name up to 30 papers (ids or links, a reading list, or your library) and get their BibTeX at once, made from their rows with no model (authors surname first, the venue when one is known, the arXiv identifiers; keys like
vaswani2017attention), and a related-work section in LaTeX written by the model from their abstracts, grouped by theme under\paragraph{}and citing every paper by its key. A citation of a key not in the list is taken out, a paper left uncited is named, and the section is kept. Given a sentence on your own paper, each paragraph ends with how it differs (src/related.rs). - It stays current.
--livereads the new and revised papers from arXiv's OAI-PMH interface every six hours, three seconds between pages, and a new paper goes to the topic whose centroid its text is nearest.
Where the data comes from#
- Papers: arXiv's metadata (librarian-bots/arxiv-metadata-snapshot, CC0), and the weeks after the snapshot from OAI-PMH.
- Citations: Crossref's references of arXiv papers' published versions (cometadata/crossref-arxiv-citations). A citing work that is an arXiv paper, by its DOI, makes an edge of the citation graph; every citing work is a reader of the recommender.
- Topics:
tools/topics.pyclusters every paper's embedding into 1,500 topics with k-means fitted on 300,000 older papers and 250,000 of the last two years (so recent research is not folded into a few catch-all topics), drops the topics fewer than 150 papers would join (--min-papers; 1,093 remain), places each paper in the nearest of its ten closest topics with a small pull toward topics that hold its primary category, puts each topic in one of 17 fields (arXiv's areas, by its papers' categories), names each from its terms and its most cited titles, and places them on the map. A topic that is mostly an old one keeps its id (--keep), and its name when its centroid has not moved (--labels). New papers are placed by the same rule insrc/live.rs. - Organisations of each paper come from OpenAlex's public snapshot (CC0) on S3, read without a key:
tools/oa_orgs.pyreads only the columns it needs (whether a work is on arXiv, its arXiv link, its authors' institutions) from the 744 GB of Parquet files, about 30 GB, andtools/labs.pyjoins them with the papers' rows intoax_lab_papersandax_labs. - Affiliations for a feed's papers are read from each paper's HTML page on arxiv.org, once a paper and fifteen seconds apart, as arXiv's
robots.txtasks. The app never reads arxiv.org's search or API pages.
Run it#
Build both programs, prepare the rows (a few GB of downloads), then start chloedb-arxiv with servers of its own:
(cd chloedb-server && cargo build --release --bin chloedb-server) cd chloedb-arxiv && cargo build --release target/release/chloedb-arxiv prepare --snapshot ~/arxiv/snapshot --cites ~/arxiv/crossref/all.parquet --out ~/arxiv/rows python3 tools/topics.py --rows ~/arxiv/rows --name target/release/chloedb-arxiv prepare --snapshot ~/arxiv/snapshot --cites ~/arxiv/crossref/all.parquet --topics ~/arxiv/rows/topics.tsv --out ~/arxiv/rows target/release/chloedb-arxiv serve --local ./arxiv-search --local-graph ./arxiv-graph --rows ~/arxiv/rows --server-bin ../chloedb-server/target/release/chloedb-server
Open http://127.0.0.1:7700 and go to Apps → arXiv. --only cs.,stat.ML on prepare keeps a slice, which fits on a laptop.
Two servers, split by job#
The papers, people, topics and their words live on one chloedb-server (the search server, --strata); the reading events, the recommender, the citation and coauthor graphs, what readers keep, and the model calls live on another (the graph server, --graph). A recommender and a graph walk are fastest with their rows in one database (through a coordinator, a walk takes a round of reads over the shards per hop), so these tables are not sharded; splitting by job gives each server a machine of its own instead. Without --graph, one server holds everything. The graph server holds a row per paper and per person (ax_nodes) for the walks to rank.
chloedb-arxiv serve --strata http://search:7700 --graph http://graph:7700 --key "$CHLOEDB_KEY" --token "$ARXIV_TOKEN" --listen 0.0.0.0:7860 --live chloedb-server --app arxiv=http://arxiv-app:7860 ... # the command center lists it
deploy/k8s.yaml and deploy/app.yaml run it on Kubernetes: two nodes of 16 GB, a server on each, and the app beside the graph server. Each database is on its node's own SSD rather than a network volume, the graph database (3.6 GB) is read into memory after a start, and the search server allows a GROUP BY of two million groups, since "who writes most" on a broad subject groups every author of tens of thousands of papers. deploy/backup.yaml takes a checkpoint of each server a night (POST /v1/admin/checkpoint into --backup-dir, hard-linking what the previous one has) and keeps the two newest. With --public the app serves the page at / to anyone, reads and a reader's own library and feeds, within --per-minute requests a minute from one address; https://arxiv.chloetech.ai is this, through a web proxy.
--answer-model names the model of summaries and TL;DRs, and --issue-model the one that explains an issue's papers from their full text (both are called through the graph server's llm(), which holds the provider's key); --llm-per-day caps new calls a day, and everything written is kept, so it is written once. arXiv asks programs to read a page every 15 seconds, so the first issue of ten papers takes about ten minutes; a page and its figures, once read, are kept (ax_notes, ax_figures).
The tables#
| table | server | what |
|---|---|---|
ax_papers |
search | a paper: title, abstract, people, categories, dates, techniques, domains, kinds, counts, topic, and emb (its text embedded by the server) |
ax_authors |
search | a person: papers, citations, h-index, first and last paper, categories and techniques |
ax_topics, ax_concepts, ax_cats, ax_venues |
search | topics, techniques and domains, categories, venues, with counts by year |
ax_complete |
search | what the search box completes: phrases of titles, people, techniques, categories |
ax_nodes |
graph | the graphs' nodes: every paper's id and every person's key |
ax_cites, ax_coauthors |
graph | edges: who cites whom, who writes with whom and how often |
ax_events |
graph | reading events: a citing work's references, and what readers open and save here |
reading_* |
graph | the recommender's counts (CREATE RECOMMENDER reading) |
ax_feeds, ax_issues, ax_notes, ax_answers, ax_library |
graph | feeds, their issues, the papers' pages as read and what the model wrote, readers' libraries |
ax_figures |
graph | the figures issues show, each image copied once from the paper's page |
ax_labs, ax_lab_papers |
search | each organisation with its papers in all, in the last twelve months and the twelve before; each paper's organisations with the columns a lab page counts by |
ax_watches, ax_matches |
graph | readers' standing questions, and each paper read for one with the model's verdict and why |
Experiments#
The Experiments app (its README) can study this site's real search. It puts AI agents, playing people written from the papers, on the search with some of it changed. The app takes experiments only when it is started with a token for them:
chloedb-arxiv serve ... --experiments-token "$ARXIV_EXPERIMENTS_TOKEN" --experiment-index v2=ax_papers_v2 chloedb-experiments serve ... --source arxiv=app:http://arxiv-app:7860 # with CHLOEDB_SOURCE_ARXIV_TOKEN=$ARXIV_EXPERIMENTS_TOKEN
The token (--experiments-token, or CHLOEDB_ARXIV_EXPERIMENTS_TOKEN) opens only /v1/experiment, with the same routes as chloedb-hn's: the site, a search with knobs, a paper (/v1/experiment/item/:id) and a sample of papers, well cited and ordinary, across the years. These routes read, and write nothing.
| group | knobs |
|---|---|
| Query understanding | understand: "by hinton", "since 2020", "cs.CL", "surveys", "newest" and questions in a sentence become filters and sorts |
| Retrieval | typos, synonyms (rag, llm, gnn and the field's others), meaning, authors (papers whose authors the words name are candidates) |
| Ranking | cites (the exponent of citations + 1), recency, meaning_weight, phrase, abstract_weight, author_weight; rank, a whole ORDER BY expression over ax_papers in place of them |
| Blending | max_per_category, max_per_author (a primary category's or a first author's papers past this many move below the others), fresh |
| Index | index: main, or an index named by --experiment-index NAME=TABLE |
Tests#
tests/cluster.rs starts two chloedb-servers through serve --local --local-graph, loads a small made-up arXiv into them (embedded by the hash:512 model, so nothing is downloaded), and checks every page: search, a paper's citations and what to read next, a person, a topic, the atlas, events becoming For you, a feed's preview, what to cite for a draft, people to work with, reviewers for a paper and for a pasted abstract with its authors left out, a standing question kept, listed, read as RSS and dropped, and that gaps, new topics, spread, rising people, code, labs and trends answer.
cd chloedb-arxiv && cargo test --profile ci