From 3ba34824c634edf48484a7f38055988502dae7e0 Mon Sep 17 00:00:00 2001 From: Heng Qian Date: Mon, 2 Sep 2024 10:29:35 +0800 Subject: [PATCH] Refine alert prompt Signed-off-by: Heng Qian --- public/components/incontext_insight/generate_popover_body.tsx | 2 +- server/types.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/components/incontext_insight/generate_popover_body.tsx b/public/components/incontext_insight/generate_popover_body.tsx index 7116521e..9a255a18 100644 --- a/public/components/incontext_insight/generate_popover_body.tsx +++ b/public/components/incontext_insight/generate_popover_body.tsx @@ -85,7 +85,7 @@ export const GeneratePopoverBody: React.FC<{ summaryType, summaryContent, contextContent, - 'Please provide your insight on this alert to help users understand this alert, find potential causes and give feasible solutions to address this alert' + `Please provide your insight on this ${summaryType}.` ); } }) diff --git a/server/types.ts b/server/types.ts index 5130c888..1894728a 100644 --- a/server/types.ts +++ b/server/types.ts @@ -54,13 +54,13 @@ declare module '../../../src/core/server' { export const SummaryType = [ { id: 'alerts', - prompt: `You are an OpenSearch Alert Assistant to help summarize the alerts. Here is the detail of alert: $\{parameters.context}; The question is $\{parameters.question}`, + prompt: `You are an OpenSearch Alert Assistant to help summarize the alerts.\n Here is the detail of alert: $\{parameters.context};\n The question is: $\{parameters.question}`, }, ]; export const InsightType = [ { id: 'alerts', - prompt: `You are an OpenSearch Alert Assistant to provide your insight on this alert. Here is the detail of alert: $\{parameters.context}; The alert summary is $\{parameters.summary}; The question is $\{parameters.question}`, + prompt: `You are an OpenSearch Alert Assistant to provide your insight on this alert to help users understand the alert, find potential causes and give feasible solutions to address it.\n Here is the detail of alert: $\{parameters.context};\n The alert summary is: $\{parameters.summary};\n The question is: $\{parameters.question}`, }, ];