fix: refine group intro prompt guidance

This commit is contained in:
Peter Steinberger
2026-01-13 03:40:22 +00:00
parent fcc814accd
commit d45915d39f
3 changed files with 5 additions and 2 deletions

View File

@@ -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:<id>` when routing or allowlisting.

View File

@@ -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({

View File

@@ -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(" ")