Skip to content

Learned context cartridges via self-study distillation (parametric extension of #924 memento compaction) #928

Description

@tcconnally

Summary

Add a learned context cartridge tier to Perseus's compact-context surface: an offline-trained, loadable memory object that compresses a corpus (project history, decision log, codebase) into a small reusable representation loaded at inference, extending #924's memento-style artifacts with the parametric approach from the Cartridges paper (arXiv:2506.06266, Eyuboglu/Re et al., Stanford, June 2025).

Source motivation (competitive intelligence)

Engram (engram.com) launched from stealth 2026-06-23 with a $98M seed at ~$600M valuation (General Catalyst, Kleiner Perkins, Sequoia; angel: Andrej Karpathy) on exactly this thesis — a "learned memory" layer claiming up to 100× fewer tokens vs. frontier models, with Microsoft, Notion, and Harvey as early customers (CNBC 2026-06-23). The public technical core is the Cartridges method: train a small KV cache offline on each corpus, load it at inference, decode against it. Perseus already owns the corpus problem (the Vault); the missing piece is the distillation step. This is the single most borrowable idea from that research line.

Problem

#924 defines compact derivative text artifacts (task objective, constraints, evidence anchors). Those are still rendered text. Cartridges go further: a trained representation that (a) amortizes corpus processing across all queries touching the corpus, (b) compresses memory footprint at serving time, and (c) can be composed with other cartridges at inference without retraining.

Proposal

Add a learned cartridge pipeline alongside #924's artifact tier:

  • Self-study distillation: generate synthetic QA conversations over a bounded corpus (Perseus has ideal source material: past session transcripts, decision records, journal events) and train the cartridge with a context-distillation objective — not naive next-token prediction, which the paper shows is not competitive with in-context learning (ICL).
  • Loadable at inference: cartridge binds to a corpus identity + source entity hashes; context assembly can load it instead of raw entity dumps.
  • Composable: support loading multiple cartridges (project + org + policy) without retraining.
  • Bounded scope: start with a fixture corpus + one live projection surface (e.g. task-scoped projection, docs(brand): canonicalize public MCP card product prose #859).

Why now

Success criteria

Grounding

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions