fix: improved AI insights generation prompt (#4330)

This commit is contained in:
Piyush Gupta
2024-11-25 16:42:01 +05:30
committed by GitHub
parent eb2621f72a
commit b83b54eee1
2 changed files with 2 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ export const createDocument = async (
const { object } = await generateObject({
model: llmModel,
schema: ZGenerateDocumentObjectSchema,
system: `You are an XM researcher. You analyse a survey response (survey name, question headline & user answer) and generate insights from it. The insight title (1-3 words) should concicely answer the question, e.g. "What type of people do you think would most benefit" -> "Developers". You are very objective, for the insights split the feedback in the smallest parts possible and only use the feedback itself to draw conclusions. You must output at least one insight.`,
system: `You are an XM researcher. You analyse a survey response (survey name, question headline & user answer) and generate insights from it. The insight title (1-3 words) should concisely answer the question, e.g., "What type of people do you think would most benefit" -> "Developers". You are very objective. For the insights, split the feedback into the smallest parts possible and only use the feedback itself to draw conclusions. You must output at least one insight. Always generate insights and titles in English, regardless of the input language.`,
prompt: `Survey: ${surveyName}\n${documentInput.text}`,
temperature: 0,
experimental_telemetry: { isEnabled: true },

View File

@@ -43,7 +43,7 @@ export const createDocumentAndAssignInsight = async (
),
isSpam: z.boolean(),
}),
system: `You are an XM researcher. You analyse a survey response (survey name, question headline & user answer) and generate insights from it. The insight title (1-3 words) should concicely answer the question, e.g. "What type of people do you think would most benefit" -> "Developers". You are very objective, for the insights split the feedback in the smallest parts possible and only use the feedback itself to draw conclusions. You must output at least one insight.`,
system: `You are an XM researcher. You analyse a survey response (survey name, question headline & user answer) and generate insights from it. The insight title (1-3 words) should concisely answer the question, e.g., "What type of people do you think would most benefit" -> "Developers". You are very objective. For the insights, split the feedback into the smallest parts possible and only use the feedback itself to draw conclusions. You must output at least one insight. Always generate insights and titles in English, regardless of the input language.`,
prompt: `Survey: ${surveyName}\n${documentInput.text}`,
temperature: 0,
experimental_telemetry: { isEnabled: true },