openvibers/openvibe.ai Commits
AI: a channel description names the streamer or says "they", never a guessed pronoun (#103)
Changes
@@@ -68,7 +68,7 @@ const templates = [description: 'From ai-analysis.generateStreamerOverview.',input_schema: { type: 'object' }, output_schema: { type: 'object' },system_prompt: '',-- user_prompt: 'You are writing the public description of a livestreamer\'s channel. It is shown on their channel page, in search results and on the home page\'s cards, so the first sentence must stand alone as a one-line summary of what they stream. Using only the signals below (aggregated across their streams, VODs and pastes), write 2-4 sentences of plain prose: what they stream (games, topics, activities), what keeps coming back, and the tone of the streams. Start with the streamer\'s name.\n\nRules:\n- Plain text only: no lists, bullets, headings, markdown, labels ("Handle:", "Overview:") or @handles.\n- Never describe anyone\'s appearance, body, clothing, age, ethnicity or perceived gender, and never guess at their private life, health or location.\n- No moderation notes, warnings or ratings.\n- Do not invent specifics the signals do not support; when the signals are thin, one or two short sentences are enough.\n\n{{ctx}}',++ user_prompt: 'You are writing the public description of a livestreamer\'s channel. It is shown on their channel page, in search results and on the home page\'s cards, so the first sentence must stand alone as a one-line summary of what they stream. Using only the signals below (aggregated across their streams, VODs and pastes), write 2-4 sentences of plain prose: what they stream (games, topics, activities), what keeps coming back, and the tone of the streams. Start with the streamer\'s name, and after that refer to them by name or as "they"; never guess pronouns.\n\nRules:\n- Plain text only: no lists, bullets, headings, markdown, labels ("Handle:", "Overview:") or @handles.\n- Never describe anyone\'s appearance, body, clothing, age, ethnicity or perceived gender, and never guess at their private life, health or location.\n- No moderation notes, warnings or ratings.\n- Do not invent specifics the signals do not support; when the signals are thin, one or two short sentences are enough.\n\n{{ctx}}',default_route: 'live.legacy', owner: 'live',},{@@@ -138,6 +138,7 @@ t.test("a channel description is public prose: never about looks, no lists or laconst prompt = tp('live.streamer.overview').user_prompt;assert.match(prompt, /public description/);assert.match(prompt, /Never describe anyone's appearance, body, clothing, age/);++ assert.match(prompt, /never guess pronouns/);assert.ok(!/moderation\.?$|notable for moderation/m.test(prompt), 'no staff-only moderation notes');assert.match(tp('live.media.overview').user_prompt, /Never describe anyone's appearance/);const out = POSTPROCESS['live.streamer.overview']({ text: '## Overview\n- Streamer handle: finditfixit (@finditfixit).\n- **Content:** repairs old TVs and radios\n- Tone: calm, patient\n\nAnn streams games: mostly Rust.' });
@@ -68,7 +68,7 @@ const templates = [
@@ -68,7 +68,7 @@ const templates = [
description: 'From ai-analysis.generateStreamerOverview.',
description: 'From ai-analysis.generateStreamerOverview.',
input_schema: { type: 'object' }, output_schema: { type: 'object' },
input_schema: { type: 'object' }, output_schema: { type: 'object' },
system_prompt: '',
system_prompt: '',
- user_prompt: 'You are writing the public description of a livestreamer\'s channel. It is shown on their channel page, in search results and on the home page\'s cards, so the first sentence must stand alone as a one-line summary of what they stream. Using only the signals below (aggregated across their streams, VODs and pastes), write 2-4 sentences of plain prose: what they stream (games, topics, activities), what keeps coming back, and the tone of the streams. Start with the streamer\'s name.\n\nRules:\n- Plain text only: no lists, bullets, headings, markdown, labels ("Handle:", "Overview:") or @handles.\n- Never describe anyone\'s appearance, body, clothing, age, ethnicity or perceived gender, and never guess at their private life, health or location.\n- No moderation notes, warnings or ratings.\n- Do not invent specifics the signals do not support; when the signals are thin, one or two short sentences are enough.\n\n{{ctx}}',
+ user_prompt: 'You are writing the public description of a livestreamer\'s channel. It is shown on their channel page, in search results and on the home page\'s cards, so the first sentence must stand alone as a one-line summary of what they stream. Using only the signals below (aggregated across their streams, VODs and pastes), write 2-4 sentences of plain prose: what they stream (games, topics, activities), what keeps coming back, and the tone of the streams. Start with the streamer\'s name, and after that refer to them by name or as "they"; never guess pronouns.\n\nRules:\n- Plain text only: no lists, bullets, headings, markdown, labels ("Handle:", "Overview:") or @handles.\n- Never describe anyone\'s appearance, body, clothing, age, ethnicity or perceived gender, and never guess at their private life, health or location.\n- No moderation notes, warnings or ratings.\n- Do not invent specifics the signals do not support; when the signals are thin, one or two short sentences are enough.\n\n{{ctx}}',
default_route: 'live.legacy', owner: 'live',
default_route: 'live.legacy', owner: 'live',
},
},
{
{
@@ -138,6 +138,7 @@ t.test("a channel description is public prose: never about looks, no lists or la
@@ -138,6 +138,7 @@ t.test("a channel description is public prose: never about looks, no lists or la
const prompt = tp('live.streamer.overview').user_prompt;
const prompt = tp('live.streamer.overview').user_prompt;
assert.match(prompt, /public description/);
assert.match(prompt, /public description/);
assert.match(prompt, /Never describe anyone's appearance, body, clothing, age/);
assert.match(prompt, /Never describe anyone's appearance, body, clothing, age/);
+ assert.match(prompt, /never guess pronouns/);
assert.ok(!/moderation\.?$|notable for moderation/m.test(prompt), 'no staff-only moderation notes');
assert.ok(!/moderation\.?$|notable for moderation/m.test(prompt), 'no staff-only moderation notes');
assert.match(tp('live.media.overview').user_prompt, /Never describe anyone's appearance/);
assert.match(tp('live.media.overview').user_prompt, /Never describe anyone's appearance/);
const out = POSTPROCESS['live.streamer.overview']({ text: '## Overview\n- Streamer handle: finditfixit (@finditfixit).\n- **Content:** repairs old TVs and radios\n- Tone: calm, patient\n\nAnn streams games: mostly Rust.' });
const out = POSTPROCESS['live.streamer.overview']({ text: '## Overview\n- Streamer handle: finditfixit (@finditfixit).\n- **Content:** repairs old TVs and radios\n- Tone: calm, patient\n\nAnn streams games: mostly Rust.' });