Skip to content

Memory: voice turns are logged with prompt scaffolding, and recall speaks stored rows verbatim #186

Description

@BrettKinny

Found by a no-robot smoke test of the merged voice provider inside the deployed container (2026-10-05).

Observed. "Do you remember my favourite colour?" returned, as TTS-bound text:

😐 user: {"content": "…"} --- HARD CONSTRAINTS for THIS reply (overrides everything else): 1. Reply in ENGLISH ONLY. … | user: {"content": "…"} --- HARD CONSTRAINTS …

Two causes.

  1. dotty-pi-ext/src/lib/turn_logger.ts stores the user message exactly as pi received it. PiVoiceLLM appends tool-routing guidance and the HARD CONSTRAINTS rules to every prompt, so each category=conversation row is mostly prompt scaffolding (user half is truncated at 500 chars). In a live brain.db, 253 of 402 conversation rows carried the suffix.
  2. The direct recall route in pi_voice.py (from Fix post-release automation and firmware onboarding findings #173) yields the raw memory_lookup output. That output is stored rows (user: … | assistant: …), not speech.

Also worth knowing. Every voice turn writes a conversation row, so bench/A-V test prompts land in the household memory store and can be surfaced by later recalls.

Fix on the RC branch. A turn_text.ts helper separates the person's words from scaffolding; the turn logger stores only the former; memory_lookup cleans rows written before the fix at read time (no DB mutation); explicit recall passes the search results to the model as context and lets it phrase the answer.

AI-assisted: drafted by Claude (Opus 5.5) from a supervised session on 2026-10-05.

Activity

  1. added
    bugSomething isn't working
    area:xiaozhiUnraid xiaozhi-server container + custom providers
    safetySafety / correctness / child-safety bug
    on Oct 5, 2026
  2. added 2 commits that reference this issue on Oct 5, 2026
    11eb4d5
    39975e4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:xiaozhiUnraid xiaozhi-server container + custom providersbugSomething isn't workingsafetySafety / correctness / child-safety bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions