We can think of AI CoPilot as consisting of 3 components:
- A âQuestion Helperâ component that identifies relevant metadata to attach to a userâs Input question. It sends the question, metadata, and a set of instructions to (2).
- The âOpenAI large language model (LLM)â, which takes everything given from (1) and returns a response with a set of instructions for (3).
- An âAnswer Helperâ, which lives inside the Heap app and has access to the same data available to the authenticated end user. It takes the response from (2), generates a chart, and shows it to the end user in the Heap app.
Hereâs an end-to-end example of how these components work together:
Letâs say the user asks AI CoPilot: âHow many signups have I had in France this week?â.
- The âQuestion Helperâ component of AI CoPilot attaches a property to the question, such as the ââcountryâ property. This question, the metadata, and a set of instructions is sent to the OpenAI LLM.
- The OpenAI LLM returns a response with another set of instructions that tells the Heap user interface what kind of chart to create. In this example, the instructions would be something like: ââcreate a line chartââ, ââuse the country propertyââ, and ââset the date range to âlast 7 daysââ.
- The âAnswer Helperâ creates a line chart using the âcountryâ property that looks at data from the last 7 days. This chart is shown to the end user in the Heap app.
Heap owns and develops (1) and (3), and OpenAI owns and develops (2). We carefully control which data we send to OpenAI. See additional FAQs below for more context on these controls.