[GH-ISSUE #906] [Feature]: Allow users to customize Knowledge Retrieval agent context formatting #442

Closed
opened 2026-10-20 17:28:54 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @cha1latte on GitHub (May 15, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/906

What problem does this solve?

Users can edit an agent's Prompt Template, but the Knowledge Retrieval agent also receives retrieved data through non-editable prompt assembly and formatting layers. If that injected context format confuses the model or undermines the agent's job, changing only the <agent> instruction section may not be enough to correct the behavior.

Proposed solution

Add a focused user-editable template or configuration field for how the Knowledge Retrieval agent formats retrieved knowledge/context before sending it to the model.

For the first slice, keep the scope limited to the Knowledge Retrieval agent:

  • Leave the existing agent Prompt Template editor in place.
  • Add control over the retrieved-context wrapper/formatting that is currently fixed by the app.
  • Preferably include a read-only preview of the final assembled agent prompt/input so users can debug how their template and injected data combine.

Alternatives considered

  • Make every hidden or built-in prompt in the app user-editable. This is broader than the immediate problem and should be split into separate requests.
  • Make all built-in agent prompt assembly fully editable at once. This may be useful later, but it is harder to review and risks turning prompt assembly into a large product surface before the Knowledge Retrieval pain point is solved.
  • Continue relying only on the existing Prompt Template editor. That does not address fixed injected-data formatting.

Additional context

This request was narrowed from a broader Discord feature request for "complete agent prompts" to be user-editable. The specific actionable gap is not the existing editable <agent> prompt template; it is the hidden/non-editable context formatting that surrounds or feeds the Knowledge Retrieval agent.

Related context mentioned in Discord: a prior Knowledge Retrieval agent behavior report/fix where retrieved data formatting appeared to affect whether the agent could reliably summarize or retrieve knowledge.

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 @cha1latte on GitHub (May 15, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/906 ## What problem does this solve? Users can edit an agent's Prompt Template, but the Knowledge Retrieval agent also receives retrieved data through non-editable prompt assembly and formatting layers. If that injected context format confuses the model or undermines the agent's job, changing only the `<agent>` instruction section may not be enough to correct the behavior. ## Proposed solution Add a focused user-editable template or configuration field for how the Knowledge Retrieval agent formats retrieved knowledge/context before sending it to the model. For the first slice, keep the scope limited to the Knowledge Retrieval agent: - Leave the existing agent Prompt Template editor in place. - Add control over the retrieved-context wrapper/formatting that is currently fixed by the app. - Preferably include a read-only preview of the final assembled agent prompt/input so users can debug how their template and injected data combine. ## Alternatives considered - Make every hidden or built-in prompt in the app user-editable. This is broader than the immediate problem and should be split into separate requests. - Make all built-in agent prompt assembly fully editable at once. This may be useful later, but it is harder to review and risks turning prompt assembly into a large product surface before the Knowledge Retrieval pain point is solved. - Continue relying only on the existing Prompt Template editor. That does not address fixed injected-data formatting. ## Additional context This request was narrowed from a broader Discord feature request for "complete agent prompts" to be user-editable. The specific actionable gap is not the existing editable `<agent>` prompt template; it is the hidden/non-editable context formatting that surrounds or feeds the Knowledge Retrieval agent. Related context mentioned in Discord: a prior Knowledge Retrieval agent behavior report/fix where retrieved data formatting appeared to affect whether the agent could reliably summarize or retrieve knowledge. ## 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-20 17:28:54 +07:00
Author
Owner

@cha1latte commented on GitHub (May 15, 2026):

Triage note: labeling this as scope-risk because the request is aligned with Marinara's agent and prompt-assembly workflows, but it touches non-editable Knowledge Retrieval prompt assembly and may need a product decision about which final-prompt layers become editable versus preview-only.

The least risky next step is to design a first slice limited to Knowledge Retrieval context formatting before considering broader hidden-prompt or all-agent prompt customization.

<!-- gh-comment-id:4464001834 --> @cha1latte commented on GitHub (May 15, 2026): Triage note: labeling this as `scope-risk` because the request is aligned with Marinara's agent and prompt-assembly workflows, but it touches non-editable Knowledge Retrieval prompt assembly and may need a product decision about which final-prompt layers become editable versus preview-only. The least risky next step is to design a first slice limited to Knowledge Retrieval context formatting before considering broader hidden-prompt or all-agent prompt customization.
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#442
No description provided.