[GH-ISSUE #5240] [Issue]: Add semantic retrieval (RAG) support for automatic summaries #2902

Closed
opened 2026-10-21 05:57:49 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @SpicyMarinara on GitHub (Aug 19, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5240

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Add an optional RAG or semantic-retrieval mode for automatic summaries. Older summaries should be stored and retrieved when relevant, while recent summaries remain in the active prompt context.

Expected behavior

Users should be able to enable semantic retrieval for automatic summaries so relevant older summaries are included as needed without keeping the entire accumulated summary history in the prompt context.

Actual behavior

Automatic summaries currently keep accumulated summaries in the prompt context, which can cause the summary context to grow substantially during very long-running chats even when older summaries are condensed.

Steps to reproduce

  1. Enable automatic summaries and use Marinara for a very long-running chat.
  2. Allow multiple summaries to accumulate and older summaries to be condensed.
  3. Observe that the accumulated summary context remains included in the prompt instead of retrieving only summaries relevant to the current conversation.

Environment

  • Marinara Engine version: Not provided
  • Install type: Not provided
  • OS + version: Not provided
  • Browser or app shell: Not provided

Logs, screenshots, or video

Not provided in the Discord context.

Additional context

The request is motivated by roleplay use cases, where summaries preserve gradual relationship development and emotional context better than isolated message retrieval. The user has experimented with a modified Lorebook Keeper combined with semantic search as a summary-RAG substitute. Marinara indicated that a semantic toggle and support for summaries could be added.

Discord thread: FR - RAG for Automatic Summaries
Discord thread link: https://discord.com/channels/1417099416812392641/1539453563644682330
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (3 messages)
[2026-08-19T01:58:51.237Z] 부비: Hi! I recently started using Marinara as my first local chat frontend, and I've really been enjoying it. Thank you so much for making it!

If I understand correctly, the automatic summary system currently keeps the accumulated summaries in the prompt context. Please correct me if I'm misunderstanding how it works.

For very long-running chats, it seems like the summary context can still grow quite large over time—even if older summaries are condensed again. Would it be possible to add a RAG/retrieval-based option for automatic summaries?

I especially like automatic summaries for roleplay because they preserve gradual relationship development and emotional context better than retrieving isolated chunks of old messages.

For example, older summaries could be stored and retrieved only when they're relevant to the current conversation, while the most recent summaries could remain in the active context. I think this could help preserve the benefits of narrative summaries while keeping context usage manageable in very long chats.

At the moment, I've been experimenting with a slightly modified Lorebook Keeper as a replacement for automatic summaries, then using semantic search to make it work somewhat like summary RAG. *u.u* ... It actually works surprisingly well, which made me wonder whether something similar could be supported directly by the automatic summary system.

Thank you for considering it!
[Discord message: https://discord.com/channels/1417099416812392641/1539453563644682330/1539453563644682330]

[2026-08-19T01:58:51.761Z] Professor Mari [bot]: Howdy!

Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.**

**Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab:

`Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.`

If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here:

`Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version`

Thank you, this will help tremendously.

This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case.

Cheers!
[Discord message: https://discord.com/channels/1417099416812392641/1539453563644682330/1539453565842497589]

[2026-08-19T03:35:32.294Z] Marinara: Yeah, we could add semantic toggle and support to summaries.
[Discord message: https://discord.com/channels/1417099416812392641/1539453563644682330/1539477895041392701]

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 @SpicyMarinara on GitHub (Aug 19, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5240 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Add an optional RAG or semantic-retrieval mode for automatic summaries. Older summaries should be stored and retrieved when relevant, while recent summaries remain in the active prompt context. ## Expected behavior Users should be able to enable semantic retrieval for automatic summaries so relevant older summaries are included as needed without keeping the entire accumulated summary history in the prompt context. ## Actual behavior Automatic summaries currently keep accumulated summaries in the prompt context, which can cause the summary context to grow substantially during very long-running chats even when older summaries are condensed. ## Steps to reproduce 1. Enable automatic summaries and use Marinara for a very long-running chat. 2. Allow multiple summaries to accumulate and older summaries to be condensed. 3. Observe that the accumulated summary context remains included in the prompt instead of retrieving only summaries relevant to the current conversation. ## Environment - Marinara Engine version: Not provided - Install type: Not provided - OS + version: Not provided - Browser or app shell: Not provided ## Logs, screenshots, or video Not provided in the Discord context. ## Additional context The request is motivated by roleplay use cases, where summaries preserve gradual relationship development and emotional context better than isolated message retrieval. The user has experimented with a modified Lorebook Keeper combined with semantic search as a summary-RAG substitute. Marinara indicated that a semantic toggle and support for summaries could be added. Discord thread: FR - RAG for Automatic Summaries Discord thread link: https://discord.com/channels/1417099416812392641/1539453563644682330 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (3 messages)</summary> ```text [2026-08-19T01:58:51.237Z] 부비: Hi! I recently started using Marinara as my first local chat frontend, and I've really been enjoying it. Thank you so much for making it! If I understand correctly, the automatic summary system currently keeps the accumulated summaries in the prompt context. Please correct me if I'm misunderstanding how it works. For very long-running chats, it seems like the summary context can still grow quite large over time—even if older summaries are condensed again. Would it be possible to add a RAG/retrieval-based option for automatic summaries? I especially like automatic summaries for roleplay because they preserve gradual relationship development and emotional context better than retrieving isolated chunks of old messages. For example, older summaries could be stored and retrieved only when they're relevant to the current conversation, while the most recent summaries could remain in the active context. I think this could help preserve the benefits of narrative summaries while keeping context usage manageable in very long chats. At the moment, I've been experimenting with a slightly modified Lorebook Keeper as a replacement for automatic summaries, then using semantic search to make it work somewhat like summary RAG. *u.u* ... It actually works surprisingly well, which made me wonder whether something similar could be supported directly by the automatic summary system. Thank you for considering it! [Discord message: https://discord.com/channels/1417099416812392641/1539453563644682330/1539453563644682330] [2026-08-19T01:58:51.761Z] Professor Mari [bot]: Howdy! Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.** **Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab: `Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.` If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here: `Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version` Thank you, this will help tremendously. This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case. Cheers! [Discord message: https://discord.com/channels/1417099416812392641/1539453563644682330/1539453565842497589] [2026-08-19T03:35:32.294Z] Marinara: Yeah, we could add semantic toggle and support to summaries. [Discord message: https://discord.com/channels/1417099416812392641/1539453563644682330/1539477895041392701] ``` </details> ## 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-21 05:57:49 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Aug 19, 2026):

Ownership: @SpicyMarinara is handling this in the combined assigned-issue sweep covering #5235, #5237, #5238, #5239, and #5240. A draft PR against staging will be linked before implementation proceeds.

<!-- gh-comment-id:5339497277 --> @SpicyMarinara commented on GitHub (Aug 19, 2026): Ownership: @SpicyMarinara is handling this in the combined assigned-issue sweep covering #5235, #5237, #5238, #5239, and #5240. A draft PR against `staging` will be linked before implementation proceeds.
Author
Owner

@SpicyMarinara commented on GitHub (Aug 19, 2026):

Implementation is now tracked in draft PR #5244 against staging.

<!-- gh-comment-id:5339519035 --> @SpicyMarinara commented on GitHub (Aug 19, 2026): Implementation is now tracked in draft PR #5244 against `staging`.
Author
Owner

@SpicyMarinara commented on GitHub (Aug 19, 2026):

SpicyMarinara is taking the Roleplay follow-up. PR #5244 added semantic retrieval to Conversation summaries, but the reported request is Roleplay-focused and the existing Chat Summaries popover still lacks the control. Reopening this issue until the Roleplay UI and prompt path are implemented and verified on desktop and mobile.

<!-- gh-comment-id:5340934672 --> @SpicyMarinara commented on GitHub (Aug 19, 2026): SpicyMarinara is taking the Roleplay follow-up. PR #5244 added semantic retrieval to Conversation summaries, but the reported request is Roleplay-focused and the existing Chat Summaries popover still lacks the control. Reopening this issue until the Roleplay UI and prompt path are implemented and verified on desktop and mobile.
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-Engine#2902
No description provided.