Page cover image

Generating Analyses

Core user experience

Patterns simulates the experience you'd have working with an expert analyst at your company who never gets tired, has every answer at their fingertips and can type at 200wpm.

Make a data analytics request by asking a well-framed question that describes the desired output of the analysis and it'll get right to work. The basic flow of interacting with your AI Analyst consists of:

  1. You -> Ask a Question

  2. AI Analyst -> Interprets your Question and generates a response with SQL/Chart code that queries data and visualizes the results

  3. You + AI Analyst -> Iterate until you get the desired results

  4. You -> Save the Analysis for retrieval, alerts, reports, and dashboards

We'll break down what's happening in each step with tips for how to get the most out of each interaction with the AI but first, what is an Analysis?

What is an Analysis?

To provide a data-driven response when you ask a question, your AI analyst will 1) generate SQL, 2) create a data table for the results, and 3) generate a chart to visualize the data. These three objects - SQL + Data + Chart - comprise an Analysis.

Here is a simple example response from the question what's sales revenue by week?

Types of Analyses

Generating Analyses is as easy as asking a question, however there is a lot you can do with your AI Analyst and the data you've connected to it.

Explore connected data

Explore possible analyses

Advise on metrics and KPIs

Pull lists of data

Create metrics

Create data visualizations

Iterate on visualizations

Advanced Analyses for more technical folks:

Behind the scenes Patterns operates on Python, SQL, Vega-Lite, making many things possible if you can speak in those languages. Pair that with GPT-4, who is extremely technical and can do some pretty creative things, you can do some pretty cool things:

Clean and format data

Generate fake datasets

In this instance, your AI doesn't have the ability to directly write CREATE table statements, so you must instruct it to write a SELECT statement that contains a function for generating your desired dataset.

Write pseudo-SQL

Tips for asking for an Analysis

If you know exactly what you want, including the table, how to perform the calculation, and previous Analyses that are related, and the chart/visualization you expect, ask for it with as much detail as you can provide.

1. Referencing Tables

If you know the name of the table you expect the AI to query, mention it! If you don't, no worries, the AI will probably still get it right as long as your table are clearly named.

2. Specifying Calculations

If you know how you would like a specific metric calculated, specify it. For example, if you would like to create a metric for projected annual run rate, the AI will make a best guess in the context of your business, such as taking the sum of last 12 months. However, if you grew a lot in the past 3 months and expect that to be more representative of your future growth, specify to calculate please take the last 3 months of revenue and multiply by 4.

3. Specifying Charts

If you want a chart, you should ask for it. A lot of times questions can be answered with simple pulls of data and the AI will only do that unless you ask for a chart. Most of the time you can just ask it to create a chart or visualize it and the AI will make it's best guess.

If you know exactly what you want, specify it in detail such as:

  • type of chart (bar, line, plot etc.)

  • name the axes (what on X and Y)

  • formatting of data types ($'s or datetimes, be detailed)

  • colors

  • tooltips

  • filters

Last updated