今日已更新 317 条资讯 | 累计 37222 条内容
关于我们

Treat Voice-Companion Memory as a Consent Ledger, Not Prompt History

LunarDrift 2026年08月29日 14:22 1 次阅读 来源:Dev.to

A personalized voice companion creates an uncomfortable trade-off: users do not want to repeat themselves, but they also do not want a misheard sentence to become a permanent “fact.” That tension is often hidden by calling conversation history memory . The implementation then retrieves old text, inserts it into a prompt, and trusts the LLM to interpret it correctly. A safer design gives memory to the application, not the model: The model may propose a typed fact. The companion must ask whether it should remember that fact. The user may confirm, reject, correct, or later revoke it. Only active, confirmed records can enter an LLM request. This tutorial builds that boundary in TypeScript and shows how it fits a Tencent RTC Conversational AI voice companion. We will use a social companion that can remember a preferred name, music genre, and conversation style—but not arbitrary instructions. Start with the trust boundary Keep the live-media pipeline and the memory lifecycle separate: Microphone │ ▼ Real-time voice session / speech recognition │ recognized turn ▼ Application turn coordinator ─────► LLM provider │ │ │ proposed typed memory │ response text ▼ ▼ Consent ledger Speech synthesis │ └──── confirmed facts only ────────► future LLM prompts Tencent RTC's Conversational AI documentation describes real-time voice interaction with multiple LLM providers. Its LLM configuration guidance also covers OpenAI-compatible models, agent platforms such as Dify and Coze, and request identifiers for routing and observability: Tencent Conversational AI overview Large Language Model configuration Social Entertainment solution The RTC layer can carry the live conversation, but your application should remain authoritative over what becomes durable memory. What the LLM is allowed to do For this example, the model can suggest one of three bounded slots: Slot Accepted values Suggested lifetime preferred_name A short name Until revoked music_genre An application-owned enum 30 days chat_st

本文内容来源于互联网,版权归原作者所有
查看原文