diff --git a/lib/shared/src/prompt/prompt-mixin.ts b/lib/shared/src/prompt/prompt-mixin.ts index 2ea45f582b94..f114b7e82d6d 100644 --- a/lib/shared/src/prompt/prompt-mixin.ts +++ b/lib/shared/src/prompt/prompt-mixin.ts @@ -27,11 +27,13 @@ export class PromptMixin { * Prepends all mixins to `humanMessage`. Modifies and returns `humanMessage`. */ public static mixInto(humanMessage: InteractionMessage): InteractionMessage { + const rules = + "Answer questions using the shared context without making assumptions or fabricating additional details. If my request requires you to generate new code snippets, make sure to include complete workable code, not fragments. If you do not have enough information to answer, tell me you don't know." const mixins = [...this.mixins, ...this.customMixin].map(mixin => mixin.prompt).join('\n\n') if (mixins) { // Stuff the prompt mixins at the start of the human text. // Note we do not reflect them in displayText. - return { ...humanMessage, text: `${mixins}\n\n${humanMessage.text}` } + return { ...humanMessage, text: `${rules}\n\n${mixins}\n\n${humanMessage.text}` } } return humanMessage } @@ -48,7 +50,7 @@ export class PromptMixin { */ export function languagePromptMixin(languageCode: string): PromptMixin { return new PromptMixin( - `(Reply as Cody developed by Sourcegraph in the language with RFC5646/ISO language code "${languageCode}" unless instructed) Hi, I need your help.` + `(Reply as Cody created by Sourcegraph in the language with RFC5646/ISO language code "${languageCode}") Hi, I need your help.` ) }