![](https://d15shllkswkct0.cloudfront.net/wp-content/blogs.dir/1/files/2024/08/snowflake-1.png)
![](https://d15shllkswkct0.cloudfront.net/wp-content/blogs.dir/1/files/2024/08/snowflake-1.png)
Snowflake Inc. today announced the public preview of Cortex Analyst, a new tool that allows users to analyze records in its cloud data platform with natural language prompts.
Workers often consume business information in the form of dashboards. Typically, fixing an issue in a dashboard or carrying out an analysis that it doesn’t support out of the box requires users to request help from their company’s data science team. The process can take days depending on the complexity of the requested change.
According to Snowflake, Cortex Analyst is designed to help customers avoid such delays. Instead of waiting for the data science team to set up a new dashboard or modify an existing one, a business user can ask Cortex Analyst to carry out analyses. The tool automatically turns workers’ natural language instructions into SQL queries that can run on Snowflake.
Customers have multiple ways of accessing Cortex Analyst. It’s available through Streamlit in Snowflake, a feature of the cloud data platform that provides a no-code interface for running queries. Snowflake is also making Cortex Analyst accessible through an application programming interface that will allow developers to integrate it into their software.
Under the hood, Cortex Analyst is powered by large language models from Mistral AI SAS and Meta Platforms Inc.’s Llama series. Optionally, customers can also use OpenAI models deployed on Microsoft Azure. The process through which Cortex Analyst uses those LLMs to turn user prompts into queries comprises several steps.
First, the tool instructs each LLM to generate SQL code that can carry out the analysis requested by the user. Cortex Analyst then runs the LLM-generated queries through an automated debugging module dubbed the Error Correction Agent. The module can detect, among others, situations where an LLM attempts to query data using hallucinated commands that are not part of the SQL syntax.
Once all the code errors are fixed, Cortex Analysts inputs the LLM-generated queries into yet another software component called the Synthesizer Agent. This component distills the queries into a single code snippet that can carry out the analysis requested by the user.
LLMs historically struggled to generate SQL code. According to Forrester Research Inc. data cited by Snowflake today, AI-generated SQL queries are accurate in 20% to 70% of cases depending on the complexity of the task they’re designed to perform. The company says that it built Cortex Analyst with those reliability challenges in mind.
To avoid confusing the LLMs on which it relies to generate queries, Cortex Analyst uses relatively simple schemas. Schemas are the files that define how the dataset used in an analytics project is formatted.
For added measure, Snowflake configured Cortex Analyst to avoid processing user queries that may be too complicated for its LLMs. “Instead of producing incorrect results, it suggests alternative queries that can be confidently answered,” Snowflake engineers detailed in a blog post.
The company plans to follow up Cortex Analyst’s launch into public preview today with several feature enhancements. One update will add support for multi-turn chat interactions, while another will equip the tool with the ability to carry out more complex data processing tasks. Snowflake plans to roll out the new features in the coming quarter.
THANK YOU