🌐 US-Proxy
id="body-softwares" class="foundation-grid action-show controller-softwares engine-home">

Inspiration

Recommender systems learn a lot about the people who use them: what they read, what they like, what they skip. AI assistants with memory learn even more. That data usually sits on someone else's server.

Recommendation and retrieval have grown very close. With a graph, a vector index and a small model, you can already suggest a good book. So we asked: can a recommender with current data run entirely in the browser, keep your reading history on your device and still work offline?

What it does

Sottobanco recommends books published from 2022 to 2026. It uses a graph built from the Open Library dumps: 10,452 books linked to their authors, subjects and user-made lists.

You start from books you like, or from a sentence describing your taste. Two algorithms then work on the same graph from the same starting books, so you can compare them side by side:

  • Pixie: a random walk with restart, based on the Pinterest Pixie paper. It runs in a web worker in about 50 ms, with no LLM and no network call.
  • ToG: a Think-on-Graph agent. An LLM explores the graph with Cypher queries, keeping 3 paths over 2 hops.

Every recommendation comes with the graph paths behind it, and the UI draws the edges walked, the nodes visited and the branches pruned. Explanations cite those paths, and any citation that doesn't match a real path is dropped.

Your library, sessions, likes and history live in a graph database inside your browser. After the first launch, Pixie and search work offline. The LLM features are optional, and with Ollama they run on localhost, so nothing leaves your computer.

How we built it

  • Offline build (Python): reads the monthly Open Library dumps, keeps the books in the date window that have a description and at least 3 subjects, and maps a genre for each book. It adds multilingual sentence embeddings, quantized to int8. Then it prunes the graph as in the Pixie paper: nodes with a single book are dropped, and so are the 10% of subjects and lists with the highest topic entropy.
  • In the browser: Relate compiled to WebAssembly, stored in OPFS. On first launch the app imports a 6 MB snapshot and builds a full-text index and a vector index, in about 7 seconds on an M1 laptop. Every read and write is a Cypher statement.
  • User data as a graph: sessions, runs, recommendations, their evidence and your feedback form a user subgraph next to the catalogue. That subgraph gives ToG its memory of past sessions and builds your profile, without an LLM.
  • Search by taste: your text is embedded on your device with transformers.js.
  • LLM: a single OpenAI-compatible client, for OpenRouter, Ollama or any compatible URL.
  • Evaluation: a link-prediction test adapted from the Pixie paper. We hold out 34 Open Library lists, give each method half of a list's books and measure how much of the other half it finds.

Challenges we ran into

  • Fitting a database in a browser tab. The catalogue had to stay small enough to download and import quickly. The build tries windows from 5 years down to 2 and picks the widest one that keeps the graph under the size limit. The full build of the dumps took 78 minutes and peaked at 4.1 GB of RAM.
  • Models running inside the browser. We tried WebLLM so the LLM could run inside the browser too. None of the 5 small models we tested returned valid JSON in 19 answers out of 20, so we removed it. For a model on your own device, the app now uses Ollama.
  • LLMs inventing evidence. Explanations sometimes cited paths that don't exist, so the app checks every citation against the real graph paths and drops the ones that don't match.
  • Untrusted text. Titles, descriptions and list names on Open Library are written by users. In the prompts they sit in a separate data block, every id the LLM returns is checked against the candidates, and the app shows that text as plain text only.
  • Browser limits. Relate WASM with OPFS is supported only on Chrome. The browser build can't open native .rl files, so the build also writes one with the Python client. It came out at 101 MB, above GitHub's file limit, so it ships gzipped (24.6 MB).

Accomplishments that we're proud of

  • The graph beats text similarity. On 34 held-out lists, Pixie reaches a Recall@10 of 0.41, against 0.18 for an embeddings-only baseline, and the 95% confidence intervals don't overlap.
  • Every recommendation can be traced to concrete paths in the graph, and the UI shows how each algorithm got there.
  • After the first launch, Pixie needs no network and no LLM, and the import takes seconds.
  • Each run is written in a single Cypher statement, so it is saved whole or not at all. "Forget everything" really deletes your data, and "Export" gives it back to you as JSON.

What we learned

  • A simple random walk on a well-pruned graph can be fast and accurate enough to run on the user's device.
  • Graph-guided LLM agents aren't automatically better. In our test, ToG did no better than the text-only baseline, though its citations were valid more often than Pixie's LLM explanations.
  • Pruning the hubs, as the Pixie paper does, made no measurable difference on this catalogue.
  • With only 34 test lists the confidence intervals are wide, and reporting them changed how we read our own results.

What's next for Sottobanco

  • A third family of algorithms based on graph similarity, comparing small graphs built around each book (for example with Weisfeiler-Lehman kernels).
  • A richer multi-agent ToG, with an index built for each query.
  • Making "Not for me" reversible.
  • Running the demo without users bringing their own API key, through a proxy with a spending cap.
  • A richer graph populated with more books ranging from further in time. Now it only has books form 2022 to 2026
  • GoodReads support for importing reading history

Built With

Share this project:

Updates

Submission history