Skip to main content

This is a 2-Part tutorial. The first part is a quick guide to writing a good system message to teach your agent its instructions. The second part is how to set up your server, to deal with these actions and send the necessary data back. In this tutorial, we will be using the example of a clothing store, where users can search for items of clothing, subscribe to a newsletter, cancel their subscription, and purchase clothes.

1

Identify all POST Endpoints

First you need to figure out all the POST endpoints that are used by the agent. We recommend you use up to 10, but the fewer the better. We also recommend you dynamically add system dialogues using the AppendDialogue endpoint depending on how the conversation is going.Let’s say I have the following endpoints:
2

Construct as Follows

Now create a system message of the following structure:

Introduce the Concept

First tell outline to the bot what it is supposed to do.

List the Actions

Then list the actions that the bot can take, and the required JSON for each action. Here is the format we recommend:

Putting This Together

If we put this together, we get the following system message, for our clothing store: