feat: Improved Default Code Interpreter Prompt for Reliability #5075

Closed
opened 2025-11-11 16:11:29 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @Acters on GitHub (May 6, 2025).

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

The current Default Code Interpreter Prompt mentions back ticks, however some LLMs fail to understand or predict that it is related to the markdown ```py ``` formatting as the token can be different.

In fact, I have noticed with the current prompt, some LLM models will happily remove one backtick ending up with one less backtick for some reason. example: ``py ```

Desired Solution you'd like

Changing the Default prompt to the following improves the reliability of generating code that doesn't end up formatted with markdown tags.
attached as a file because of discord's markdown formatting.

systemprompt.txt

Alternatives Considered

No response

Additional Context

No response

Originally created by @Acters on GitHub (May 6, 2025). ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description The current Default Code Interpreter Prompt mentions back ticks, however some LLMs fail to understand or predict that it is related to the markdown \`\`\`py \`\`\` formatting as the token can be different. In fact, I have noticed with the current prompt, some LLM models will happily remove one backtick ending up with one less backtick for some reason. example: \`\`py \`\`\` ### Desired Solution you'd like Changing the Default prompt to the following improves the reliability of generating code that doesn't end up formatted with markdown tags. attached as a file because of discord's markdown formatting. [systemprompt.txt](https://github.com/user-attachments/files/20071921/systemprompt.txt) ### Alternatives Considered _No response_ ### Additional Context _No response_
Author
Owner

@Classic298 commented on GitHub (May 6, 2025):

Create a PR! :D

@Classic298 commented on GitHub (May 6, 2025): Create a PR! :D
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#5075