Skip to content

Conversation

@tamuratak
Copy link

fix: improve Markdown formatting instructions for system prompts. Fix microsoft/vscode#283488

The new prompt copied from

<Tag name='special_formatting'>
Use proper Markdown formatting:
- Wrap symbol names (classes, methods, variables) in backticks: `MyClass`, `handleClick()`<br />
- When mentioning files or line numbers, always follow the rules in fileLinkification section below:
<FileLinkificationInstructions />
<MathIntegrationRules />
</Tag>

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves Markdown formatting instructions in system prompts by clarifying the distinction between symbol names (which should use backticks) and file references (which should use markdown links). The changes align three GPT-5 family prompts with the pattern already established in gpt51CodexPrompt.tsx, addressing issue #283488.

Key Changes

  • Removes ambiguous instruction to wrap filenames in backticks, which conflicted with the FileLinkificationInstructions component that explicitly forbids backticks for file references
  • Adds explicit guidance that symbol names (classes, methods, variables) should use backticks while file/line references must follow FileLinkificationInstructions rules
  • Consolidates formatting instructions in gpt51Prompt.tsx by moving FileLinkificationInstructions into the special_formatting section

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/extension/prompts/node/agent/openai/gpt5Prompt.tsx Removes conflicting instruction to wrap filenames in backticks from reminder instructions
src/extension/prompts/node/agent/openai/gpt5CodexPrompt.tsx Removes partial conflicting instruction and keeps only the general "Use proper Markdown formatting" guidance
src/extension/prompts/node/agent/openai/gpt51Prompt.tsx Adds comprehensive special_formatting section clarifying symbol names use backticks while files follow FileLinkificationInstructions; moves FileLinkificationInstructions from final_answer_formatting to special_formatting for better organization

The changes look good and properly address the conflict between the previous instructions. The new pattern clearly separates concerns: backticks are for code symbols, and markdown links are for file references per the FileLinkificationInstructions component which explicitly states "NO BACKTICKS ANYWHERE" for file references.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GPT-5 mini complains system instructions on links are conflicting, and they are actually conflicting

3 participants