diff --git a/docs/concepts/groups.md b/docs/concepts/groups.md index b02e050c1..1670a9550 100644 --- a/docs/concepts/groups.md +++ b/docs/concepts/groups.md @@ -212,7 +212,7 @@ Group inbound payloads set: - `WasMentioned` (mention gating result) - Telegram forum topics also include `MessageThreadId` and `IsForum`. -The agent system prompt includes a group intro on the first turn of a new group session. +The agent system prompt includes a group intro on the first turn of a new group session. It reminds the model to respond like a human, avoid Markdown tables, and avoid typing literal `\n` sequences. ## iMessage specifics - Prefer `chat_id:` when routing or allowlisting. diff --git a/src/auto-reply/reply.triggers.test.ts b/src/auto-reply/reply.triggers.test.ts index 3c431d94a..9925b27bf 100644 --- a/src/auto-reply/reply.triggers.test.ts +++ b/src/auto-reply/reply.triggers.test.ts @@ -2015,7 +2015,7 @@ describe("trigger handling", () => { describe("group intro prompts", () => { const groupParticipationNote = - "Be a good group participant: mostly lurk and follow the conversation; reply only when directly addressed or you can add clear value. Emoji reactions are welcome when available."; + "Be a good group participant: mostly lurk and follow the conversation; reply only when directly addressed or you can add clear value. Emoji reactions are welcome when available. Write like a human. Avoid Markdown tables. Don't type literal \\n sequences; use real line breaks sparingly."; it("labels Discord groups using the surface metadata", async () => { await withTempHome(async (home) => { vi.mocked(runEmbeddedPiAgent).mockResolvedValue({ diff --git a/src/auto-reply/reply/groups.ts b/src/auto-reply/reply/groups.ts index 16dbe01b3..d1eb0968d 100644 --- a/src/auto-reply/reply/groups.ts +++ b/src/auto-reply/reply/groups.ts @@ -94,6 +94,8 @@ export function buildGroupIntro(params: { : undefined; const lurkLine = "Be a good group participant: mostly lurk and follow the conversation; reply only when directly addressed or you can add clear value. Emoji reactions are welcome when available."; + const styleLine = + "Write like a human. Avoid Markdown tables. Don't type literal \\n sequences; use real line breaks sparingly."; return [ subjectLine, membersLine, @@ -102,6 +104,7 @@ export function buildGroupIntro(params: { silenceLine, cautionLine, lurkLine, + styleLine, ] .filter(Boolean) .join(" ")