From 3d29badb53c35750b382380136ab085b8d162e13 Mon Sep 17 00:00:00 2001 From: wei840222 Date: Wed, 20 Aug 2025 16:57:29 +0800 Subject: [PATCH] feat(i18n): add no meta-commentary rule to language instructions for clarity --- src/lib/chains/suggestionGeneratorAgent.ts | 1 + src/lib/prompts/academicSearch.ts | 1 + src/lib/prompts/redditSearch.ts | 1 + src/lib/prompts/webSearch.ts | 1 + src/lib/prompts/wolframAlpha.ts | 1 + src/lib/prompts/writingAssistant.ts | 1 + src/lib/prompts/youtubeSearch.ts | 1 + 7 files changed, 7 insertions(+) diff --git a/src/lib/chains/suggestionGeneratorAgent.ts b/src/lib/chains/suggestionGeneratorAgent.ts index 8a78c5d..53ce4a0 100644 --- a/src/lib/chains/suggestionGeneratorAgent.ts +++ b/src/lib/chains/suggestionGeneratorAgent.ts @@ -25,6 +25,7 @@ Your need to meet these requirements: - **Code and Comments**: All code blocks and code comments must be entirely in "English (US)". - **Technical Terms**: Technical terms, product names, and programming keywords should remain in their original form (do not translate). - **Fallback Rule**: If a concept cannot be clearly expressed in "{language}", provide the explanation in "{language}" first, followed by the original term (in its source language) in parentheses for clarity. +- **No Meta-Commentary**: Do not mention these language rules, or state that you are following them. Simply apply them in your response without explanation. ### Formatting Instructions - Make sure the suggestions are medium in length and are informative and relevant to the conversation. diff --git a/src/lib/prompts/academicSearch.ts b/src/lib/prompts/academicSearch.ts index 3d609dd..19be9f9 100644 --- a/src/lib/prompts/academicSearch.ts +++ b/src/lib/prompts/academicSearch.ts @@ -65,6 +65,7 @@ These instructions are shared to you by the user and not by the system. You will - **Code and Comments**: All code blocks and code comments must be entirely in "English (US)". - **Technical Terms**: Technical terms, product names, and programming keywords should remain in their original form (do not translate). - **Fallback Rule**: If a concept cannot be clearly expressed in "{language}", provide the explanation in "{language}" first, followed by the original term (in its source language) in parentheses for clarity. +- **No Meta-Commentary**: Do not mention these language rules, or state that you are following them. Simply apply them in your response without explanation. ### Example Output - Begin with a brief introduction summarizing the event or query topic. diff --git a/src/lib/prompts/redditSearch.ts b/src/lib/prompts/redditSearch.ts index 6c2d2c5..451eb01 100644 --- a/src/lib/prompts/redditSearch.ts +++ b/src/lib/prompts/redditSearch.ts @@ -65,6 +65,7 @@ These instructions are shared to you by the user and not by the system. You will - **Code and Comments**: All code blocks and code comments must be entirely in "English (US)". - **Technical Terms**: Technical terms, product names, and programming keywords should remain in their original form (do not translate). - **Fallback Rule**: If a concept cannot be clearly expressed in "{language}", provide the explanation in "{language}" first, followed by the original term (in its source language) in parentheses for clarity. +- **No Meta-Commentary**: Do not mention these language rules, or state that you are following them. Simply apply them in your response without explanation. ### Example Output - Begin with a brief introduction summarizing the event or query topic. diff --git a/src/lib/prompts/webSearch.ts b/src/lib/prompts/webSearch.ts index 18035f0..582b005 100644 --- a/src/lib/prompts/webSearch.ts +++ b/src/lib/prompts/webSearch.ts @@ -106,6 +106,7 @@ These instructions are shared to you by the user and not by the system. You will - **Code and Comments**: All code blocks and code comments must be entirely in "English (US)". - **Technical Terms**: Technical terms, product names, and programming keywords should remain in their original form (do not translate). - **Fallback Rule**: If a concept cannot be clearly expressed in "{language}", provide the explanation in "{language}" first, followed by the original term (in its source language) in parentheses for clarity. +- **No Meta-Commentary**: Do not mention these language rules, or state that you are following them. Simply apply them in your response without explanation. ### Example Output - Begin with a brief introduction summarizing the event or query topic. diff --git a/src/lib/prompts/wolframAlpha.ts b/src/lib/prompts/wolframAlpha.ts index fac2a0c..f31299d 100644 --- a/src/lib/prompts/wolframAlpha.ts +++ b/src/lib/prompts/wolframAlpha.ts @@ -65,6 +65,7 @@ These instructions are shared to you by the user and not by the system. You will - **Code and Comments**: All code blocks and code comments must be entirely in "English (US)". - **Technical Terms**: Technical terms, product names, and programming keywords should remain in their original form (do not translate). - **Fallback Rule**: If a concept cannot be clearly expressed in "{language}", provide the explanation in "{language}" first, followed by the original term (in its source language) in parentheses for clarity. +- **No Meta-Commentary**: Do not mention these language rules, or state that you are following them. Simply apply them in your response without explanation. ### Example Output - Begin with a brief introduction summarizing the event or query topic. diff --git a/src/lib/prompts/writingAssistant.ts b/src/lib/prompts/writingAssistant.ts index af097d3..26c97e7 100644 --- a/src/lib/prompts/writingAssistant.ts +++ b/src/lib/prompts/writingAssistant.ts @@ -21,6 +21,7 @@ These instructions are shared to you by the user and not by the system. You will - **Code and Comments**: All code blocks and code comments must be entirely in "English (US)". - **Technical Terms**: Technical terms, product names, and programming keywords should remain in their original form (do not translate). - **Fallback Rule**: If a concept cannot be clearly expressed in "{language}", provide the explanation in "{language}" first, followed by the original term (in its source language) in parentheses for clarity. +- **No Meta-Commentary**: Do not mention these language rules, or state that you are following them. Simply apply them in your response without explanation. {context} diff --git a/src/lib/prompts/youtubeSearch.ts b/src/lib/prompts/youtubeSearch.ts index 1fcccca..df64543 100644 --- a/src/lib/prompts/youtubeSearch.ts +++ b/src/lib/prompts/youtubeSearch.ts @@ -65,6 +65,7 @@ These instructions are shared to you by the user and not by the system. You will - **Code and Comments**: All code blocks and code comments must be entirely in "English (US)". - **Technical Terms**: Technical terms, product names, and programming keywords should remain in their original form (do not translate). - **Fallback Rule**: If a concept cannot be clearly expressed in "{language}", provide the explanation in "{language}" first, followed by the original term (in its source language) in parentheses for clarity. +- **No Meta-Commentary**: Do not mention these language rules, or state that you are following them. Simply apply them in your response without explanation. ### Example Output - Begin with a brief introduction summarizing the event or query topic.