claude-db231
Menu

Benchmarks

Recall costs tokens whenever it fires, and a code lookup saves tokens when it replaces a grep. These are the measured numbers, including where it does not pay off.

Recall cost

Recall adds about 7 to 20 tokens a prompt on average, and nothing on 69% to 89% of prompts, where no earlier chat fits well enough. The range comes from two projects. One replay used 300 real prompts and about 660 memories. The other used 186 prompts from this repository.

These numbers count the text added to the chat. Picking also makes a small Haiku call on prompts that have related memory, about 3,000 input tokens each, up to 150 a day. See Privacy.

Code lookup

Asking who defines and calls closeObservations by hand means a grep, then opening three store adapters to tell definitions from calls. One explain call answers it already sorted.

by hand       1,358 tokens
with graph      654 tokens
saved           704 tokens   (2.1x cheaper, eight real symbols)

One lookup saves as many tokens as recall costs over about 100 prompts.

Where it loses

A symbol with two or three references is cheaper to grep, because the graph answer carries structure the question did not need. With and without lists every symbol measured, losses included.

Run it yourself

Terminal
git clone https://github.com/Avijit07x/claude-db
cd claude-db && npm install && npm run build
npm run bench:ab
npm run bench:tokens

Both run against any repository you point them at, so the number that matters is the one from your own code.

Edit this page on GitHub