Unlock the full potential of Large Language Models (LLMs) with our expert guide on crafting better AI prompts. At Valere, a leading AI software development company, we share nine proven techniques to help you optimize your LLM interactions, from assigning roles to providing clear feedback. Improve the quality of your AI responses and get the most out of your LLM by asking the right questions in the right way.
On this page
1. Ask the AI to Play a Role
2. Clarify the Context
3. Write Like You’re Talking to a Human
4. Set Clear Expectations
5. Provide an Example or Template
6. Provide Step-by-Step Instructions
7. Avoid Leading Questions
8. Raise the Stakes
9. Iterate and Provide Feedback
10. Bonus: Reverse-Engineer the Prompt
Assigning a specific role to the AI can make its response more relevant and aligned with your use case.
Providing detailed context within your prompts helps the AI understand the situation better.
Sometimes, writing your prompts as if you’re having a conversation with a person makes the prompt clearer and allows the AI to respond more naturally.
Be explicit about what you need from the AI. Define what a good answer looks like, including any constraints or limitations.
Including examples or templates in your prompts can guide the AI to produce responses that match your expectations.
This technique, also known as the “chain of thought,” involves guiding the model to think step-by-step through complex problems or questions.
(Note: This combines several techniques. Can you identify them?)
Avoid suggesting the expected answer to prevent biasing the AI’s response.
Framing the task as high-stakes or important can encourage the AI to “try harder.”
(Note: Some report that after offering a tip, Chat GPT generates longer answers. To see a difference, use Chat GPT in different sessions to avoid reusing the previous context.)
This is perhaps the most important tactic. If the initial response isn’t what you need, give constructive feedback and ask again.
Sometimes, the best way to create the right prompt is to provide the AI with the expected answer and then reverse engineer the prompt.
By using these techniques, you can significantly improve the quality of responses from your LLM, making your AI interactions more effective and valuable. At Valere, we’re committed to helping you leverage the full potential of AI in your projects and unlock value in your data.
Share