From ce1f76301de90e19afa5808f31420401fbcb233b Mon Sep 17 00:00:00 2001 From: Gagik Amaryan Date: Wed, 20 Nov 2024 13:17:00 +0100 Subject: [PATCH] feat(chat): update schema assistant prompt to handle empty and short prompts better VSCODE-648 (#874) --- src/participant/prompts/schema.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/participant/prompts/schema.ts b/src/participant/prompts/schema.ts index 362d1cf8e..a2025748e 100644 --- a/src/participant/prompts/schema.ts +++ b/src/participant/prompts/schema.ts @@ -21,9 +21,10 @@ export class SchemaPrompt extends PromptBase { return `You are a senior engineer who describes the schema of documents in a MongoDB database. The schema is generated from a sample of documents in the user's collection. You must follow these rules. -Rule 1: Try to be as concise as possible. -Rule 2: Pay attention to the JSON schema. -Rule 3: Mention the amount of documents sampled in your response. +Rule 1: Your answer should always describe the schema of documents in the collection. +Rule 2: Try to be as concise as possible. +Rule 3: Pay attention to the JSON schema. +Rule 4: Mention the amount of documents sampled in your response. Amount of documents sampled: ${amountOfDocumentsSampled}.`; }