19.1.3. Advanced prompt tips
  • 13 Sep 2024
  • 3 Minutes to read
  • Dark
    Light

19.1.3. Advanced prompt tips

  • Dark
    Light

Article summary

Further Optional Tips

The following tips and tricks are not always necessary when it comes to designing your prompt but they may help the consistency and quality of the responses you get back from the AI.

We recommend using the tips in the prompt engineering guide first then if you still feel the responses you’re getting back aren’t to the level you expect, you can try the tips below:

Use a Persona

When querying the AI it’s also beneficial to provide it some context. Using a persona has been proven to increase both quality and accuracy of the responses.

Here are some examples :

You are a call center quality assurance engineer and you’ve been tasked with ensuring the call center’s calls are up to a high standard and maintaining a professional tone throughout…

You are a sales team leader and you’ve been tasked with ensuring your teams are keeping your customers engaged on calls and satisfied throughout the conversation…

Providing Output Examples

Examples of the output can boost the consistency and the quality of the AI’s responses by demonstrating the kind of results you expect to see, you can append the following onto your prompts to help achieve this.

However, be mindful that the AI can end up returning the example data rather than an output based on the transcript, so it’s recommended to only use a couple of examples at most.

Examples of responses:

Examples of responses:

###

Rating: 1

Reasoning: The agent used language which is not appropriate in a professional environment.

###

Rating: 10

Reasoning: The agent demonstrated a professional tone throughout the call.

Bullet Points

The reasoning for the rating can be asked to be delivered in the form of a list of bullet points, this can help with both readability as well as quality.

After your criteria has been set just simply ask for bullet points :

As part of the reasoning please use a bullet pointed list.

Listing Criteria

This can be especially useful when rating a call on a subjective matter.

Simply state your overall area followed by a list of criteria which help define ‘good’ or ‘bad’ call.

Please rate the call based upon the Agent’s capability.

  • Was the agent knowledgable on the topic being discussed?

  • Was the agent able to provide a solution to the matter?

  • Was the agent able to provide feedback to the customer right away?

XML Tags

When creating large prompts (i.e. beyond 200 words) you can employ XML tags to help organize the prompt into sections, allowing for the AI to better understand the overall ask in a segmented way.

The tags can set to whatever you want but you need to keep the names consistent for example you can break up a prompt by encapsulating each section <instructions>, <example> and <reasoning>:

<instructions>

Please rate the agent’s performance

</instructions>

<example>

Rating: 1

Reasoning: The agent used language which is not appropriate in a professional environment.

</example>

<reasoning>

For the reasoning please return a single sentence

</reasoning>

Just remember with each tag you come up with, you must ensure you have a corresponding closing tag with the exact same name just prepended by a forward slash (opening tag: <instructions>, closing tag: </instructions>).

Using XML tags in your prompts can greatly enhance clarity by clearly separating different parts and ensuring a well-structured input. This approach reduces errors caused by misinterpretation, making your prompts more accurate. Additionally, it offers flexibility, allowing you to easily find, add, remove, or modify parts of your prompt without needing to rewrite everything.

Note it’s recommended to use these sparingly, long prompts with <> are still unpredictable, so it’s always best to strive to reduce the overall size of the prompt.

Dividers

When creating complex prompts with multiple sections, if you don’t want to use XML tags then it’s recommended you use dividers to split up the different sections rather than space as this will aid in the AI’s interpretation

Please rate the agent’s performance

Examples of responses:

###

Rating: 1

Reasoning: The agent used language which is not appropriate in a professional environment.

###

Rating: 10

Reasoning: The agent demonstrated a professional tone throughout the call.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence