Design an effective generative AI prompt
Last updated: 24 September 2024
Creating effective prompts is key to getting the best results from a generative AI chatbot. A prompt is essentially the instructions you give the AI to guide its response. Well-crafted prompts help the AI understand what you’re looking for, leading to more accurate and useful responses.
Below are a few tips on designing an effective prompt.
Set the tone and style
If you want the AI to respond in a certain style (e.g. formal, casual, funny, etc.), include this in your prompt.
For example: “Answer questions in a formal, professional tone”.
For example: “Answer in short, clear sentences”.
Provide (further) context
By default, your generative AI chatbot uses the documents uploaded as context. If you want, you can provide further context in your prompt.
For example: “Answer using words a high school student could understand”.
Avoid negatives
Prompts that include negatives are more prone to hallucinations. In most cases, avoid negatives or replace a negative with a positive.
For example, instead of “Don’t answer with more than 50 characters”, write “Make your answers short”.
Use variables
Your generative AI prompt supports all variables. Use them to customise instructions on a user-per-user basis.
For example: “Answer in {{subscriber.language}}
” will force the generative AI to answer questions in the subscriber’s language, making it more dynamic for each user.
Test and refine
It may take a few tries to get the perfect prompt to generate the right responses. There’s a reason prompt engineering is a nascent job title; writing prompts requires skill, practice, and knowledge.