Each LLM task defines one or more prompts that is sent to the LLM model when requesting the content. You can customise the prompts to direct how the model fulfills the request.
You need an administrator or publisher role in your team to change a task prompt.
Small changes to a prompt can make a significant difference to the generated output. When working with prompts, be as specific and concise as you can. If the output isn't quite what you want, try re-phrasing the task to be more explicit before you try adding more instructions to the prompt.
Different models may respond very differently to the same prompt: if you change the model, you may need to significantly change the prompt. If you're struggling to get the output you want by adjusting the prompt, consider trying a model from a different provider.
Some prompts can also make use of automated tests to generate recommended improvements.
It's important to thoroughly test your chatbot after every prompt change. Keep track of prompts or methods of phrasing that work well for different tasks and models.
Prompt variables
Prompts contain prompt variables which look like ${this}. These are placeholders for information that the generative model needs to complete the request; the prompt variables are replaced with the request information before it is sent to the generative model. For example:
- The handover transcript summary prompt needs the chat ${transcript} that should be summarised.
- The rewrite utterance prompt, which rephrases hard-to-match user questions, needs the ${userQuestion} to rephrase.
Each task has its own prompt variables that should be used as part of the prompt. When customising prompts, you must not change or delete these variables, or the prompt will no longer work correctly. Changes to a task can't be saved if the prompt variables are incorrect or missing.
Crafting prompts
Prompts usually provide better results when the information is clearly structured, concise, and specific. It can be helpful to construct your prompt in sections:
- Context or background information, such as the industry and type of work your chatbot relates to. For example: "You are working with the council customer service team."
- The task to perform, specifying any important requirements on formatting, tone, length of output, specific elements to include, or the intended goal of the task.
For example, "Create a summary of the chat transcript that highlights key themes." or "Rewrite the following question concisely in 10 words or less." - Any additional constraints or requirements.
For example, "Do not include any personal identifying information from the transcript." - Optionally, an example output in a clear structure.
Common prompt customisations
Common customisations you could consider:
- Add your industry or organisation's context, such as a bank or local council.
- Specify your preferred spelling, tone, or preferred terminology.
- Specify minimum and maximum length of the output, and the preferred format.
- Avoid including personally identifying information or irrelevant details, such as emails, dates, and phone numbers.
Keeping it real:
Generative AI models can fabricate information that is inaccurate or was not present in the request. To minimise this effect:
- Avoid telling the model to be helpful or adding similar instructions or context. Models that have been told to be helpful are more likely to fabricate information.
- Consider adding explicit instructions to avoid low-confidence results, such as "Do not include any information you are uncertain about".
- Use guardrails to check responses for groundedness.
Prompt guides
See the default prompts for the different tasks for ideas:
- Customise the prompt to rephrase user questions
- Customise the prompt to check a response for relevancy
- Customise the prompt to match passages to user questions
- Customise the prompt to generate handover transcript summaries
- Create a context-specific prompt for a handover transcript summary
- Customise the prompts for insight reports
- Customise the prompt to refine and generate message content
- Customise the prompt to translate message content and training phrases
- Customise the prompt to generate training phrases
- Customise the prompt to generate regression test cases
You can also view the prompts for other tasks:
- View the prompt to evaluate test cases for automated tests
- View the prompt to generate insights for automated tests
We don't recommend you customise these prompts.