Comment on page
Nudging your AI to perform better
Depending on your company and the use cases for the AI Analyst, you can tune the AI the respond in certain ways by leveraging the Global Context. Unlike Table Readme's and Documentation that are only added to context when queried, Analyst Context is always used when an AI Analyst answers a question.
To add Analyst context, click in the top-right and write anything you like:
Every time you Save an Analysis, that adds the Analysis' SQL query and Chart to the AI's context, so it now knows what you mean when you refer to something such as Customer LTV.
Here is an example where the AI makes an assumption on Customer LTV and how to calculate it. After saving this, the AI will know to calculate Customer LTV in a similar way every time.
Add notes in the Table's Readme to provide hints to the AI when querying tables. One common reason to add context to a Readme is when categorical data exists in a column. For example, here we've provided hints for both the external_source column and the location column enabling the AI to query without issue.
Docs can be added by clicking on them in the bottom left and adding a new one. In this screenshot below, I've added a new metrics definition "Trailing Annual Run Rate" and queried it below. If you ask for the run rate on a particular channel, location, or for the whole company, this definition will be applied when the AI Analyst answers your questin with SQL.
When you write a document, the AI will chunk it by using # separators. So if you wanted you could include all your metrics in a single document and separate them by #'s so that you're not always pulling the entire set of documentation into context.
- 1.Metrics definitions
- 2.Querying knowledge base information (eg API docs, policies, etc)
- 3.General Q&A
If you have an existing dbt project that you wish to query with natural language, you can also add this project as custom context.
This feature is in beta, and requires the Patterns team to run an internal script that will upload your dbt core project, including all your data documentation and models as Table documentation and SQL files as Generic documentation. We are exploring other integration paths and look forward to working with you here! Please contact [email protected] if interested.