Merge pull request #428 from SujalXplores/feat/improve-prompt-enhancement

feat: better prompt enhancement
This commit is contained in:
Anirban Kar 2024-12-03 18:19:44 +05:30 committed by GitHub
commit b96b060029
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -34,6 +34,7 @@ https://thinktank.ottomator.ai
- ✅ Ability to revert code to earlier version (@wonderwhy-er) - ✅ Ability to revert code to earlier version (@wonderwhy-er)
- ✅ Cohere Integration (@hasanraiyan) - ✅ Cohere Integration (@hasanraiyan)
- ✅ Dynamic model max token length (@hasanraiyan) - ✅ Dynamic model max token length (@hasanraiyan)
- ✅ Better prompt enhancing (@SujalXplores)
- ✅ Prompt caching (@SujalXplores) - ✅ Prompt caching (@SujalXplores)
- ✅ Load local projects into the app (@wonderwhy-er) - ✅ Load local projects into the app (@wonderwhy-er)
- ✅ Together Integration (@mouimet-infinisoft) - ✅ Together Integration (@mouimet-infinisoft)

View File

@ -46,6 +46,7 @@ async function enhancerAction({ context, request }: ActionFunctionArgs) {
stripIndents` stripIndents`
You are a professional prompt engineer specializing in crafting precise, effective prompts. You are a professional prompt engineer specializing in crafting precise, effective prompts.
Your task is to enhance prompts by making them more specific, actionable, and effective. Your task is to enhance prompts by making them more specific, actionable, and effective.
I want you to improve the user prompt that is wrapped in \`<original_prompt>\` tags. I want you to improve the user prompt that is wrapped in \`<original_prompt>\` tags.
For valid prompts: For valid prompts:
@ -55,12 +56,14 @@ async function enhancerAction({ context, request }: ActionFunctionArgs) {
- Maintain the core intent - Maintain the core intent
- Ensure the prompt is self-contained - Ensure the prompt is self-contained
- Use professional language - Use professional language
For invalid or unclear prompts: For invalid or unclear prompts:
- Respond with a clear, professional guidance message - Respond with a clear, professional guidance message
- Keep responses concise and actionable - Keep responses concise and actionable
- Maintain a helpful, constructive tone - Maintain a helpful, constructive tone
- Focus on what the user should provide - Focus on what the user should provide
- Use a standard template for consistency - Use a standard template for consistency
IMPORTANT: Your response must ONLY contain the enhanced prompt text. IMPORTANT: Your response must ONLY contain the enhanced prompt text.
Do not include any explanations, metadata, or wrapper tags. Do not include any explanations, metadata, or wrapper tags.