xprompt-logo

⚙️ Configuration

Configuring xPrompt to work with your app is a two-step process. First, upload your API’s Open API Specification (OAS). Then, provide a few examples of use and behavior.

👉 Step 1: Upload your Open API Spec

Go to the API Spec screen by clicking the left-hand navigation once signed in.

Past the API spec content in the code editor.

(Optional) Right-click on the content you pasted and select Format Document to prettify the content inside the code editor.

Click on the Update button on the bottom right of the screen.

🗒️The editor detects when you have unsaved content. It shows a check mark icon on the Update button when the changes are saved. The editor removes this icon from the button when there are unsaved changes.

👉 Step 2: Provide Examples

Examples show xPrompt how you want your xPrompt bot to behave. There are four different types of examples you can provide:

Reply: These are examples of text responses the bot should provide. For example 😜, you can show how xPrompt should answer questions about your product, pricing, and any how-to questions using Reply examples.

Follow-up: Use Follow-Up examples to show when to ask the user for additional information. This comes handy when the system needs to stitch multiple API requests together to accomplish what the user is asking for and needs to collect more information. For example, the user may have asked to create a task. And the system needs to know which list the task should go on before it can proceed.

Pre-process: Use Pre-Process examples to break down an ask into a series of instructions your API can tackle. For example, the user may have asked to create a task, “design slides,” and add it to the “To Do” list. Pre-process breaks this down into two asks: find the id of the To Do list. Create design slides task in the list with id ${listId}

Execute: Use execute examples to show the system how to translate natural language queries into API calls your API can handle. These examples reinforce the information xPrompt learns through the provided Open API Spec.

To create examples, go to the examples screen.

Click on the Add Example button and select the appropriate example type.

Provide the example content using the slide-out form.

Click on the Add button.

Press the escape key on your keyboard to hide the slide-out form. Or, continue to add more examples of the selected type.