Try HeapDB in your browser
Name an outcome and HeapDB ranks the top three earlier events, each with its explanation. Give feedback and we update the Beta counts on every learned link, so you watch the ranking change. Agent memory scores relevance × importance × learned usefulness, and the cause presets score lag kernel × link strength × weight. Everything runs in your browser on the same scoring code as our tests in lib/heapdb.
Scores rank candidates within one question. They aren’t probabilities. They become probability-like only after calibration against recorded feedback, and heapdb-core ships a calibration report for exactly that.
Which merged PR likely caused the error spike?
PRs merged to checkout
Shaded curve: log-normal lag kernel for error spikes, median 30 min, looking back from 15:00.
- 11:20PR #4101 Bump eslint to 9.39 (dep_bump, ci, size:small)K=0.04
- 11:50PR #4102 Docs: checkout READMEai (docs_only, size:medium, ai_authored)K=0.07
- 12:30PR #4103 Refactor payment retry clientai (path:payments/retry, size:large, review:normal, ai_authored)K=0.13
- 13:05PR #4104 Cart copy changes (path:cart/ui, size:small, review:normal)K=0.24
- 13:40PR #4105 Index orders.status (migration, path:db, review:normal)K=0.47
- 14:05PR #4106 Retry on 409 with backoffai (path:payments/retry, config, review:fast, size:medium, ai_authored)K=0.75
- 14:20PR #4107 Add idempotency_key columnai (migration, path:payments/retry, review:fast, size:medium, ai_authored)K=0.94
- 14:30PR #4108 Update lockfile (lockfile, dep_bump, size:large)K=1.00
- 14:45PR #4109 Search ranking tweakai (path:search/ranking, size:small, review:normal, ai_authored)K=0.69
- 14:52PR #4110 CI: cache node_modules (ci, review:none, size:small)K=0.26
Candidates are merged PRs, each with features such as migration, review:fast and ai_authored, kept in a max-heap by score.
Pre-merge risk: open PRs to review first
RISK OF error_spike FOR checkout: dose × noisy-OR of the current link strengths. No lag kernel, because these have not merged yet. It updates as you give feedback above.
- 1PR #4111 Migrate retry_attempts tableai1.01weight 1.24 × noisy-OR(migration 0.50, path:payments/retry 0.40, size:large 0.29, …) 0.82
- 2PR #4113 Bump stripe-sdk 12 → 130.73weight 1.54 × noisy-OR(size:large 0.29, dep_bump 0.14, lockfile 0.14) 0.48
- 3PR #4112 Tune search ranking weightsai0.25weight 0.83 × noisy-OR(ai_authored 0.14, path:search/ranking 0.10, size:small 0.10) 0.31
- 4PR #4115 Raise checkout timeout0.25weight 0.42 × noisy-OR(config 0.33, tests:none 0.33, size:small 0.10) 0.60
- 5PR #4114 Runbook for payment retriesai0.00blocked by rule: docs-only changes
What likely caused the latency spike?
Changes to checkout
Shaded curve: exponential decay kernel for latency spikes, half-life 20 min, looking back from 15:00.
- 13:10deploy #4125 (refactor)K=0.02
- 13:25deploy #4126 (ui_tweak, copy_change)K=0.04
- 13:50deploy #4127 (orm_upgrade, dep_bump)K=0.09
- 14:35cfg: pool + timeout (db_pool_size, timeout)K=0.42
- 14:48cfg: log_level (log_level)K=0.66
- 14:52flag: promo_banner (promo_banner)K=0.76
Candidates are deploys, config changes and flag flips, kept in a max-heap by score.
Agent memory: which memories help with this question?
An assistant’s memories of Maya
Example dataAfter one round of feedback. The first time this was asked, the assistant’s own note “searched flights to Lisbon” was the closest text match and ranked first, with Maya’s message second. The agent reported that it used Maya’s message and not the note, and HeapDB re-ranked.
RECALL “When is Maya's flight to Lisbon?” IN user:maya K 3 EXPLAIN
Memory 1: Maya: my flight to Lisbon leaves Friday at 9:40, back on Mondayscore 0.317
- rel 0.79
- importance 0.8
- useful 0.50
- qt:when&date:yes 0.07
- episode
- has date
- speaker: Maya
- recency off
Memory 2: Assistant: searched flights to Lisbon for Mayascore 0.282
- rel 1.00
- importance 0.8
- useful 0.35
- qt:when&num:no 0.06
- episode
- speaker: assistant
- recency off
Memory 3: Maya: my sister Ana is coming to Lisbon tooscore 0.183
- rel 0.50
- importance 0.8
- useful 0.46
- qt:when&speaker:named 0.07
- episode
- speaker: Maya
- recency off
All 10 memories, scored for this question
| memory | rel | imp | useful | score |
|---|---|---|---|---|
| Maya: my flight to Lisbon leaves Friday at 9:40, back on Monday | 0.79 | 0.8 | 0.50 | 0.317 |
| Assistant: searched flights to Lisbon for Maya | 1.00 | 0.8 | 0.35 | 0.282 |
| flights api: 14 flights to Lisbon this week, fares from 89 EUR | 0.83 | 0.6 | 0.36 | 0.179 |
| Maya is vegetarian and avoids peanuts | 0.12 | 1.3 | 0.45 | 0.070 |
| Maya: Saturday dinner will be 6 of us, with my parents and Ana | 0.09 | 0.8 | 0.50 | 0.037 |
| Assistant: booking request sent for Maya's dinner, people to confirm | 0.09 | 0.8 | 0.35 | 0.026 |
| restaurant api: Tasca do Chico has a table for 4 people on Saturday | – | – | – | no shared word |
| Maya prefers quiet restaurants and window seats | 0.11 | 1.3 | 0.45 | 0.062 |
| Maya's trip budget is 1200 EUR | 0.11 | 1.0 | 0.44 | 0.050 |
| Maya: my sister Ana is coming to Lisbon too | 0.50 | 0.8 | 0.46 | 0.183 |
Score = relevance × importance × learned usefulness. Recency is off (weight 0), the setting tuning picked on LoCoMo. Mark a memory used or not used and watch the ranking learn.
Why am I bloated?
Today’s meals
Shaded curve: log-normal lag kernel for bloating, median 2.5 h, looking back from 22:45.
- 08:00Oatmeal with milk (oats, milk)K=0.14
- 12:30Burrito (beans, onion, cheese)K=0.29
- 15:00Coffee (coffee)K=0.45
- 19:30Pasta with garlic (wheat, garlic)K=0.96
Candidates are ingredients from today’s meals, kept in a max-heap by score.
What the presets show
Code changes follows the code-changes example in heapdb-core: ten PRs merged to checkout, then an error spike at 15:00. A log-normal kernel with a 30-minute median, dose = log1p(lines changed), and features such as migration, review:fast and ai_authored. Confirmations (a revert) use proportional credit, so ai_authored takes little of the blame that belongs to the migration or the rushed review riding with it. A rule hard-blocks docs-only PRs. Below it, the pre-merge panel ranks open PRs by dose × noisy-OR of the current links, so reviewers know which ones deserve a careful look. Read the example.
Agent memory is a small model of heapdb-memory: ten memories of an assistant working for Maya, scored by BM25 relevance × importance (by memory kind) × usefulness, a noisy-OR of links learned over memory shape (kind, source, has date, has number, does the question name the speaker) crossed with the question type. Words never become links, so what one question teaches carries over to others. Recency is off by default, the setting tuning picked on LoCoMo; switch it on to compare. The demo opens after one round of feedback on the flight question, and one click shows the ranking before it. Example data. Read the example and its LoCoMo results.
Personal health uses a log-normal kernel with a median lag of 2.5 hours and ranks individual ingredients weighted by portion, so the last meal is not automatically the answer. Latency spike follows the incident example in heapdb-core: an exponential decay kernel with a 20-minute half-life, whole changes ranked by noisy-OR over their features, and priors that say most changes are innocent while pool-size changes have bitten before.
How the score is defined · How feedback is learned · All use cases