Skip to content

🐛 Fix conversation summary prompt to use user query language#1886

Merged
dartpain merged 2 commits intomainfrom
copilot/fix-1878
Jul 15, 2025
Merged

🐛 Fix conversation summary prompt to use user query language#1886
dartpain merged 2 commits intomainfrom
copilot/fix-1878

Conversation

Copy link
Contributor

Copilot AI commented Jul 15, 2025

Problem

When saving conversations, the summary generation prompt was instructing the LLM to "use the same language as the system" which was ambiguous and didn't guarantee the summary would be in the same language as the user's query. This caused conversation summaries to be generated in inconsistent languages, especially when users asked questions in languages other than English.

Solution

Updated the conversation summary prompt in save_conversation() function to explicitly reference the user's query language instead of the ambiguous "system" language.

Changes made:

  • Changed "use the same language as the system" to "use the same language as the user query" in both assistant and user role messages
  • This ensures the LLM has clear, unambiguous instructions to match the user's input language

Before:

"content": "Summarise following conversation in no more than 3 "
"words, respond ONLY with the summary, use the same "
"language as the system",

After:

"content": "Summarise following conversation in no more than 3 "
"words, respond ONLY with the summary, use the same "
"language as the user query",

Testing

  • Verified syntax correctness with Python compilation
  • Created validation test confirming prompt correctly references user query language
  • Confirmed no other similar prompts exist in the codebase
  • Minimal change affecting only 2 lines in 1 file

Fixes #1878.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@vercel
Copy link

vercel bot commented Jul 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextra-docsgpt 🔄 Building (Inspect) Visit Preview 💬 Add feedback Jul 15, 2025 9:35am
oss-docsgpt ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2025 9:35am

Copilot AI changed the title [WIP] 🐛 Bug Report: Edit prompt for saving conversations. Make sure they are saved in the same language as user query explicitly. 🐛 Fix conversation summary prompt to use user query language Jul 15, 2025
Copilot AI requested a review from dartpain July 15, 2025 09:35
@github-actions github-actions bot added the application Application label Jul 15, 2025
@dartpain dartpain marked this pull request as ready for review July 15, 2025 11:56
@dartpain dartpain merged commit 493303e into main Jul 15, 2025
14 of 17 checks passed
@dartpain dartpain deleted the copilot/fix-1878 branch December 19, 2025 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

application Application

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Bug Report: Edit prompt for saving conversations. Make sure they are saved in the same language as user query explicitly.

2 participants