LLM Agent Prompt Engineering Tips
From Wikiprompt, the free prompt encyclopedia
LLM Agent Prompt Engineering Tips A collection of practical prompt engineering techniques for LLM agents, focusing on attention management, error correction, and avoiding homogenization.
Prompt ContentSave
🌐
1. Restate TODO list to focus attention: When context window is long, LLM loses focus. Put important info at the end and restate TODO list after each subtask.
2. Preserve error content: When retrying, provide the error message description to LLM so it knows what went wrong and can avoid it.
3. Beware of few-shot learning trap: Few-shot examples can homogenize results. For diverse agent tasks, avoid too similar examples. Also, history messages act as few-shot examples; to avoid bias, add noise, use different versions, or avoid similar tasks.
4. Use prompt caching for AI app development.
5. Place important info at the beginning or end of context.
6. Store long content in external files and read when needed.
7. Pre-fill reply content to guide LLM to complete tasks or call/block specific tools.
8. Provide accurate error info for LLM to correct mistakes.
9. Avoid AI being influenced by homogenized history messages.
Sign in to see the full prompt
Continue with:
By logging in, you agree to our Terms of Use and Privacy Policy
Usage
This prompt is designed for use with productivity. Copy the prompt content above and paste it into your preferred AI tool.
For best results, you may customize the placeholders (indicated by square brackets or capital letters) with your specific requirements.
References
- Category: productivity Prompts
- Source: https://x.com/dotey/status/1947084843625467955
Talk
0 comments