fix: refine group intro prompt guidance
This commit is contained in:
@@ -212,7 +212,7 @@ Group inbound payloads set:
|
|||||||
- `WasMentioned` (mention gating result)
|
- `WasMentioned` (mention gating result)
|
||||||
- Telegram forum topics also include `MessageThreadId` and `IsForum`.
|
- 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
|
## iMessage specifics
|
||||||
- Prefer `chat_id:<id>` when routing or allowlisting.
|
- Prefer `chat_id:<id>` when routing or allowlisting.
|
||||||
|
|||||||
@@ -2015,7 +2015,7 @@ describe("trigger handling", () => {
|
|||||||
|
|
||||||
describe("group intro prompts", () => {
|
describe("group intro prompts", () => {
|
||||||
const groupParticipationNote =
|
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 () => {
|
it("labels Discord groups using the surface metadata", async () => {
|
||||||
await withTempHome(async (home) => {
|
await withTempHome(async (home) => {
|
||||||
vi.mocked(runEmbeddedPiAgent).mockResolvedValue({
|
vi.mocked(runEmbeddedPiAgent).mockResolvedValue({
|
||||||
|
|||||||
@@ -94,6 +94,8 @@ export function buildGroupIntro(params: {
|
|||||||
: undefined;
|
: undefined;
|
||||||
const lurkLine =
|
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.";
|
"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 [
|
return [
|
||||||
subjectLine,
|
subjectLine,
|
||||||
membersLine,
|
membersLine,
|
||||||
@@ -102,6 +104,7 @@ export function buildGroupIntro(params: {
|
|||||||
silenceLine,
|
silenceLine,
|
||||||
cautionLine,
|
cautionLine,
|
||||||
lurkLine,
|
lurkLine,
|
||||||
|
styleLine,
|
||||||
]
|
]
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
.join(" ")
|
.join(" ")
|
||||||
|
|||||||
Reference in New Issue
Block a user