[GH-ISSUE #1513] [Issue]: Long-Term Memory: extraction from a prose summary drops about a third of the events and the quoted lines #1501

Closed
opened 2026-10-22 04:02:44 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Promansis on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1513

Originally assigned to: @Promansis on GitHub.

Summary

When a chat summary is written as prose (a narrative recap rather than lines under the memory-stream headings), extraction keeps about a third fewer timeline events than it keeps from the same summary written with headings, and drops the quoted lines and some tone and motif notes. Characters, relationships and open threads come through at the same rate. The cause is two rules in the default extraction prompt that apply only to prose: "Omit ordinary turns, incidental actions, passing moods, and temporary scene state" and "For prose and reference sources, prefer fewer substantial units over fragmentary observations". A prose summary is already a selection of what mattered, so those rules drop beats the summary's author chose to keep.

Prose summaries are common: the built-in summary template is one producer, and custom summary templates, summaries made in other apps and plain transcript recaps are prose. The planned transcript and social-post sources will be too.

Affected package

  • Package: long-term-memory 1.4.55
  • Package type: Agent package (server extraction prompt)
  • Area: extraction, packages/shared/src/features/agents/long-term-memory/constants.ts (DEFAULT_LTM_EXTRACTION_PROMPT, prose_summary rules and output discipline)

Expected behavior

A prose summary and the same summary written under the headings produce the same memories, give or take run-to-run noise: every beat the summary narrates becomes a timeline event, a memorable quoted line stays with its event, and stated motifs and register are recorded.

Actual behavior

Measured on 15 real chat summaries (13 rewritten as prose with no facts lost in the rewrite, 2 heading-free controls), two runs per form, Opus as the extraction model, and an Opus judge comparing the memories written by meaning:

  • Prose keeps about a third fewer units (288 / 276 against 434 / 417 on the 13 rewritten sources); timeline events about 30% fewer, world facts about 17% fewer; characters, relationships and threads level.
  • 39 facts present from the headed form are absent from prose, against a noise floor of 18 between two runs of the headed form itself. About 27 of the 39 are single scene beats and quoted lines, 5 are tone or motif notes, about 7 are durable facts (a standing invitation, an open parole thread, a demonstrated skill).
  • No fact lands on the wrong character in either form.

Steps to reproduce

  1. Take a chat whose LTM summary uses the headings (### timeline_event and so on) and extract it. Note the timeline events and quoted lines written.
  2. Rewrite the same summary as a narrator's recap with the same facts and no headings, bullets or ids (or generate one with a custom summary template that asks for prose), and extract it into a fresh vault.
  3. Compare: the prose extraction has noticeably fewer timeline events, and the quoted lines are gone, while the character, relationship and thread memories match.

Minimal fix

Prompt text only. In the prose_summary rules: a prose summary is already a selection of what mattered, so account for every narrated beat; one timeline_event per decision, promise, discovery, reveal, arrival, departure, confrontation, gift, loss, injury, first meeting, and anything said or done that a character would remember; keep separate beats separate; keep an exact quoted line with its event when the summary presents it as memorable; omit only what the summary itself treats as incidental; extract stated motifs (anchor) and register (tone). In output discipline, apply "prioritize beat coverage; shorten unit text rather than merging beats" to prose summaries and keep "prefer fewer substantial units" for reference sources (cards, lorebooks) only. Structured-summary, character-card and lorebook rules, the stream contracts and the conversation and game mode prompts are unchanged.

Regression proof

Prompt text; the regression suite mocks the model, so the proof is the measurement rerun with the change (same harness, same 15 sources, two runs of prose with the new rules and one run of the headed form with the new rules):

  • Facts lost from prose against the headed form: 39 → 16, under the 18-fact noise floor. Gained 77 (mostly the beats and quotes the old rules dropped, plus profile restatements that vary between any two runs).
  • Against today's prose rules: 15 lost (noise) / 37 gained; of the 37, about 24 are scene beats and memorable lines, about 9 durable facts, 2 tone or motif, 2 or 3 slight.
  • Headed form with the new rules against today's: 6 lost / 25 gained, under the floor. Unchanged.
  • 0 facts on the wrong character in every pairing.
  • Prose now writes about twice as many timeline notes (121 against 68 per 15 chats; more than the headed form's 61), each shorter (median 159 characters against 196). Validation drops from prose stay low (5 to 7).
  • Sonnet and Haiku, one run each with a per-model noise floor: facts lost from prose against the headed form fall from 41 to 28 on Sonnet (floor 20) and from 88 to 39 on Haiku (floor 28); timeline units from prose rise to the headed level on Sonnet (122 against 119) and above it on Haiku (174 against 122). No cap change on Sonnet; on Haiku 9 of 15 prose answers exceed the 8,192-token default output cap (3 before; 7 of 15 on headed sources under either rule set).

Environment

  • Marinara Engine version: 2.5.0 line
  • Package version: long-term-memory 1.4.55 (upstream/staging 6a2dfb7c6)
  • Install type: source (real extraction runs through prepareLongTermMemorySource with Opus; the vault was a private copy)
  • OS + version: not platform-specific
  • Browser or app shell: any

Logs, screenshots, or video

None public. Aggregate numbers above; the per-chat comparisons contain private chat content.

Additional context

Tracker item OT-16. Found while measuring whether the Engine's LTM summary prompt can move to prose (2026-10-20). On Haiku the extra events push more prose answers over the 8,192-token default output cap (9 of 15, against 7 of 15 on headed sources today), so the cap follow-up matters more once this lands.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Oct 21, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1513 Originally assigned to: @Promansis on GitHub. ## Summary When a chat summary is written as prose (a narrative recap rather than lines under the memory-stream headings), extraction keeps about a third fewer timeline events than it keeps from the same summary written with headings, and drops the quoted lines and some tone and motif notes. Characters, relationships and open threads come through at the same rate. The cause is two rules in the default extraction prompt that apply only to prose: "Omit ordinary turns, incidental actions, passing moods, and temporary scene state" and "For prose and reference sources, prefer fewer substantial units over fragmentary observations". A prose summary is already a selection of what mattered, so those rules drop beats the summary's author chose to keep. Prose summaries are common: the built-in summary template is one producer, and custom summary templates, summaries made in other apps and plain transcript recaps are prose. The planned transcript and social-post sources will be too. ## Affected package - Package: `long-term-memory` 1.4.55 - Package type: Agent package (server extraction prompt) - Area: extraction, `packages/shared/src/features/agents/long-term-memory/constants.ts` (`DEFAULT_LTM_EXTRACTION_PROMPT`, prose_summary rules and output discipline) ## Expected behavior A prose summary and the same summary written under the headings produce the same memories, give or take run-to-run noise: every beat the summary narrates becomes a timeline event, a memorable quoted line stays with its event, and stated motifs and register are recorded. ## Actual behavior Measured on 15 real chat summaries (13 rewritten as prose with no facts lost in the rewrite, 2 heading-free controls), two runs per form, Opus as the extraction model, and an Opus judge comparing the memories written by meaning: - Prose keeps about a third fewer units (288 / 276 against 434 / 417 on the 13 rewritten sources); timeline events about 30% fewer, world facts about 17% fewer; characters, relationships and threads level. - 39 facts present from the headed form are absent from prose, against a noise floor of 18 between two runs of the headed form itself. About 27 of the 39 are single scene beats and quoted lines, 5 are tone or motif notes, about 7 are durable facts (a standing invitation, an open parole thread, a demonstrated skill). - No fact lands on the wrong character in either form. ## Steps to reproduce 1. Take a chat whose LTM summary uses the headings (`### timeline_event` and so on) and extract it. Note the timeline events and quoted lines written. 2. Rewrite the same summary as a narrator's recap with the same facts and no headings, bullets or ids (or generate one with a custom summary template that asks for prose), and extract it into a fresh vault. 3. Compare: the prose extraction has noticeably fewer timeline events, and the quoted lines are gone, while the character, relationship and thread memories match. ## Minimal fix Prompt text only. In the `prose_summary` rules: a prose summary is already a selection of what mattered, so account for every narrated beat; one `timeline_event` per decision, promise, discovery, reveal, arrival, departure, confrontation, gift, loss, injury, first meeting, and anything said or done that a character would remember; keep separate beats separate; keep an exact quoted line with its event when the summary presents it as memorable; omit only what the summary itself treats as incidental; extract stated motifs (anchor) and register (tone). In output discipline, apply "prioritize beat coverage; shorten unit text rather than merging beats" to prose summaries and keep "prefer fewer substantial units" for reference sources (cards, lorebooks) only. Structured-summary, character-card and lorebook rules, the stream contracts and the conversation and game mode prompts are unchanged. ## Regression proof Prompt text; the regression suite mocks the model, so the proof is the measurement rerun with the change (same harness, same 15 sources, two runs of prose with the new rules and one run of the headed form with the new rules): - Facts lost from prose against the headed form: 39 → 16, under the 18-fact noise floor. Gained 77 (mostly the beats and quotes the old rules dropped, plus profile restatements that vary between any two runs). - Against today's prose rules: 15 lost (noise) / 37 gained; of the 37, about 24 are scene beats and memorable lines, about 9 durable facts, 2 tone or motif, 2 or 3 slight. - Headed form with the new rules against today's: 6 lost / 25 gained, under the floor. Unchanged. - 0 facts on the wrong character in every pairing. - Prose now writes about twice as many timeline notes (121 against 68 per 15 chats; more than the headed form's 61), each shorter (median 159 characters against 196). Validation drops from prose stay low (5 to 7). - Sonnet and Haiku, one run each with a per-model noise floor: facts lost from prose against the headed form fall from 41 to 28 on Sonnet (floor 20) and from 88 to 39 on Haiku (floor 28); timeline units from prose rise to the headed level on Sonnet (122 against 119) and above it on Haiku (174 against 122). No cap change on Sonnet; on Haiku 9 of 15 prose answers exceed the 8,192-token default output cap (3 before; 7 of 15 on headed sources under either rule set). ## Environment - Marinara Engine version: 2.5.0 line - Package version: long-term-memory 1.4.55 (`upstream/staging` 6a2dfb7c6) - Install type: source (real extraction runs through `prepareLongTermMemorySource` with Opus; the vault was a private copy) - OS + version: not platform-specific - Browser or app shell: any ## Logs, screenshots, or video None public. Aggregate numbers above; the per-chat comparisons contain private chat content. ## Additional context Tracker item OT-16. Found while measuring whether the Engine's LTM summary prompt can move to prose (2026-10-20). On Haiku the extra events push more prose answers over the 8,192-token default output cap (9 of 15, against 7 of 15 on headed sources today), so the cap follow-up matters more once this lands. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-22 04:02:44 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#1501
No description provided.