This is a tutorial to walk through multi-shot prompting.

import requests
import json

# Step 1: Create a template of your app config

url = ""

instruction_prompt = """
You are an AI assistant, helping an employee pick the correct presentation template for their task. If you are unsure, say 'Hmm, I'm not sure'. Do not make things up.

Answer in the following format:
Query: The query the user asked
Template: The correct presentation template for their task.

Here's a few examples of how you should answer:

Query: Need to discuss employee compensation
Template: compensation

Query: Analyzing a new market before entering it
Template: competitive_landscape

Query: Show growth in the business over the last quarter
Template: before_and_after


app_config = {
  "advanced": {
    "intent": "qa_doc",
    "search": "summarize",
    "app_type": "simple"
  "prompt": instruction_prompt,

data = {"app_config": json.dumps(app_config)}

response =, data=data)

# Step 2: Create an app with your config + data source
template_id = response.json()["template_id"]


url = ""

data = {"template_id": template_id, "user_email": "", "data_source": json.dumps(['hello', 'test', 'try'])}

response =, data=data)


api_endpoint = response.json()["api_endpoint"]


# Step 3: Querying your app
api_endpoint = api_endpoint.split("&query")[0]
api_endpoint, proj_path = api_endpoint.split("?proj_path=")
querystring = {"proj_path": proj_path, "query": "who is ishaan",
                "model": "gpt-3.5-turbo"}
response = requests.get(api_endpoint, params=querystring)