-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Milestone
Description
Summary
Ensure retrieved memory is framed, timestamped, and has instructions to prefer recent conversation if conflicts exist.
Acceptance Criteria
- Retrieved hits inserted in concise, framed block with role and timestamp
- System prompt contains explicit instructions about precedence and uncertainty handling
- Config values for characters-per-hit cap (trim long hits)
- Document the prompt format and an example in repo docs
Implementation Notes
- Add constants for prompt snippet formatting in AI service or prompts module
- Example framing:
Retrieved memory (may be incomplete): - [2026-01-02 12:34] USER: ... - [2026-01-02 12:35] ASSISTANT: ... - System prompt rules:
- "If retrieved memory conflicts with recent conversation, prefer recent."
- "If memory is unclear, ask a clarifying question."
Files to Change
app/services/ai/prompts.py- New/edited prompt templatesapp/cli/docsorREADME.md- Documentation- Tests for prompt formatting
Dependencies
- Requires Retrieve relevant conversation history snippets before prompt construction #420 (Retrieval step) to be completed first
Estimate
4-8 hours
Metadata
Metadata
Assignees
Labels
No labels