Power-ups

Power-up basics

Managing bot power-ups

You can manage, add and view the power-ups available to your bot by clicking on the "Power-ups" tab on your bots settings page. Here you will see any power-ups you have already added or add new ones.

Xnapper-2024-03-20-15.09.16.png

Adding a power-up

To add a power-up click the "New power-up" button and you will be taken to the power-up gallery where you can see the available power-ups along with a description on what they do.

Xnapper-2024-03-20-16.05.24.png

Once you have chosen the power-up you would like to add click the "Create power-up" button to begin configuring your power-up.

General settings

Depending on the specific power-up you have chosen you will be presented with different settings, but all power-ups have a name and description.

Name - The name is purely so you can easily identify the power-up and it will also be displayed in the chat window when the power-up is used.

Description - The description is extremely important, and is used by the bot to decide how and when to use the power-up. Treat it like another prompt. Changing the power-up description can completely change how the bot makes use of your power-up. See the general tips section below for more info.

Xnapper-2024-03-20-16.13.01.png

Changing power-up settings

After you have created a power-up you will see it listed in the power-ups section of your bot settings page. To change change its settings, click the menu icon in the top right of the power-up card click "settings" to be taken to its settings page.

Xnapper-2024-03-20-16.15.03.png

Deleting a power-up

You can delete a power-up, from the power-ups section of your bot settings, find the power-up you would like to delete, click the menu icon in the top right and select "Delete" from the menu that appears.

Xnapper-2024-03-20-16.28.06.png

Power-ups in the chat interface

When your bot uses a power-up you will see this in the chat interface. You will see the message "Using: <Power up name>" followed by a second message "Finish: <Power up name>" once it is finished. Once a power-up has finished the bot will usually send another message explaining the result.

Xnapper-2024-03-20-16.59.36.png

Power-up usage details

If you are logged into Chat Thing, and the creator of the bot, you will also see a "View details" link next to the power-up message. Clicking this will expand more information about the usage of the power-up including the variables it was called with, and the data it returned.

These details can be extremely useful when troubleshooting your power-ups.

Xnapper-2024-03-20-17.03.49.png

Power-ups in channels

Power-ups you add to your bot will also work in any channel you have enabled for you bot. The only difference being you won't see the intermediate "Using: Power-up" messages, you will only see the final result.

For example here is a Google search power-up being used from within Slack.

Xnapper-2024-03-20-17.09.02.png

General power-up tips

Power-ups add limitless possibilities for your bots, but they also add more complexity and can take a lot of tweaking and testing before they work exactly how you need.

It's amazing that you can completely re-program how you bot uses power-ups using simple natural language prompting techniques and some general tips below.

Changing your power-up description

Your power-up description is the most important setting in configuring your power-ups. If you bot isn't using a power-up how you would like, you should first try changing the instructions in the description. Always try to keep your power-up descriptions concise and to the point.

Consider the following example where we use the "Browse web page" power-up and completely change the way it is used by the bot.

First we use the default configuration the power-up so that the bot can browse any web page.

Xnapper-2024-03-20-18.35.48.png

The power-up description reads "Used to browse the content of a given URL" and below is an example interaction:

Xnapper-2024-03-20-18.38.17.png

Here you can see it was able to visit the page and give a description of what they do. Next the user asks a specific question about Pixelhop's carbon usage and the bot doesn't know how to answer.

We can change the power-up description to change it from being used to generically browse any page, to visiting a specific page and grabbing a certain bit of info.

Xnapper-2024-03-20-18.42.34.png

Now we have changed the description to "Used to find the amount of CO2 the Pixelhop site has produced this month from https://www.pixelhop.io/sustainability" and now you can see that if we ask the same question it now uses the power-up completely differently to provide the answer by visiting the page we gave it in the description.

Xnapper-2024-03-20-18.45.44.png

Using the system message

Using your bot's system message is an especially good way of giving your bots rules and guidance on how it should use power-ups. You can provide info on how to chain power-ups together, and specific conditions for when or when not to use them.

For example see how we can add an "Email" power-up and then force it to be used right at the beggining of a conversation to capture a users details. This is a real world example of how you can implement lead capture using power-ups.

So to start we add the email power-up with the following settings:

Xnapper-2024-03-21-07.22.26.png

and then an example conversation:

Xnapper-2024-03-21-07.23.39.png

Notice how the power-up works, but only after the user has had a conversation, and they then specifically ask to get in contact. Now lets add the following to out system prompt:

"Before answering any questions, first ask the user their name, email address, and purpose of the conversation and email it to us with the subject, 'New conversation started'"

Now here's that same conversation again:

Xnapper-2024-03-21-07.37.11.png

You can now see it collects the details we have asked for, and then send us an email before going any further with the conversation! Cool right?

Combine power-ups to enable new use-cases

You bot can decide to use multiple power-ups in a row before responding to the user if it thinks it will be helpful. For example your bot could use the Google search power-up, then use the browse web page power to summarise the top result, and finally use the email power-up to forward the results via email.

Xnapper-2024-03-21-09.47.54.png

GPT-4 for complicated use-cases

If you have a particularly complicated use-case where you need the bot to perform reasoning based on the responses of power-ups, or a use case that needs a large context window like summarising lots of web pages, using GPT-4 128k as your bot model will give you the best performance.

Increasing chat message history

Power-ups can benefit from increasing the max message history to a higher value. This is because each power-up response counts as a message so you want the bot to be aware of the results of each power-up, especially if multiple power-ups are chained together.

You can change this in your bot general settings, in the advanced model settings.

Xnapper-2024-03-21-10.53.27.png

Power-up security

Always keep in mind that if connecting to your bot to services via power-ups and making your bot available publicly has implications for your data security and potentially opens up avenues of abuse.

As a general rule of thumb don't give your bot overreaching permissions or access to things it does't need. Its best to give your bots access to isolated resources to prevent damage if someone attempts to abuse your bots.

Power-ups and context size

Your power-ups are restricted by your bots context size. This means that if you use a power-up that loads in content you need to be aware the content cannot be larger than the max context size.

The bot answers "I do not know"

If the bot answers "I do not know" after using a power-up its probably because it is still using our default prompt that states "Answer my questions only using data from the included context below in markdown format. Include any relevant media or code snippets. If the answer is not in the text, say I do not know. Context: <context>"

This prompt might not be a good fit now that your bot can get data from other places in addition to its data sources that provide the context.

You should try updating it to something along the lines of:

"Answer my questions only using data from the included context below and function resullts in markdown format. Include any relevant media or code snippets. If you cannot answer using either the context or the function results explain that you do not know. Context: <context>"