Are you ready to have conversations with your data? Announced in public preview within Microsoft Fabric is AI Skill, a new capability in Fabric that allows you to build your own generative AI experiences. In short, this is a generative AI product that enables a fundamentally new way for you to interact with your data, dramatically increasing the amount of data-driven decision-making. (If you are not familiar with generative AI, LLMs, RAG, ChatGPT, and OpenAI, check out my blogs Introduction to OpenAI and LLMs and Introduction to OpenAI and LLMs – Part 2).
One generative AI product that you may already be familiar with is Fabric Copilot, which helps you explore data more easily. It is intended to be an assistant, and as such, there is an expectation that the end user will work with the AI to verify and approve its outputs. Copilots are incredibly powerful for anyone performing data tasks in Fabric, but after working with many customers, Microsoft has observed a need for a different experience. An experience that requires even less input from the end user. This is where AI Skill comes in.
What is an AI Skill?
AI skills allow you, a Fabric developer, to create your own conversational Q&A systems in Fabric using generative AI on your structured data (limited to a Lakehouse or Warehouse for now). By putting in effort up front, you can give end users the experience of simply asking a question and getting a reliable, data-driven answer in return. With the AI Skill, you can provide instructions and examples to guide the AI to the correct answer for any given question in your organization. This allows you to ensure that the AI understands your organization and your data context before you share this capability more broadly with others in your organization or team, who can then ask their questions in plain English.
How does the AI Skill work?
The AI skill relies on Generative AI – specifically, Large Language Models (LLMs). These LLMs can generate queries, in this case T-SQL queries, based on a given schema and a user question. The system sends the question asked in the AI skill interface along with information about the selected data (metadata that includes the table and column names, and the data types found in the tables) to the LLM. Next, it requests the generation of a T-SQL query that answers the question. Then it parses the generated query to first ensure that it doesn’t change the data in any way, and then executes that query. Finally, it shows the query execution results. An AI skill is intended to access specific database resources, and then generate and execute relevant T-SQL queries. You can ask questions on the data such as “How many active customers did we have on June 1st, 2013?” or “Which promotion was the most impactful?” or even “What is the largest table?”
Why do I need an AI Skill?
Many organizations have centralized or embedded analyst groups, who spend significant portions of their day answering data questions that are not necessarily overly complex or nuanced but still require knowledge about query languages (like T-SQL) as well as the data context. As a result, data-driven insights remain locked behind a few groups or individuals, who often struggle to keep up with requests for answers. Responding to constant incoming data questions takes valuable time away from more sophisticated analysis or proactive strategic planning.
Generative AI offers a promising solution to this challenge. Generative AI has proven to be adept at writing queries. The part that is still missing in many generative AI applications is the nuance and context that comes with any real-world data system. AI skills allow you to capture this context and nuance in a way that allows the AI to understand your data systems fully. You cannot expect a newly hired analyst to immediately and reliably tackle all incoming data questions on day one. You expect them to gradually learn about your metrics, definitions, and data quirks. In the same way, you cannot expect an AI to be perfectly accurate in answering questions unless you give it the full set of background information that it needs to answer your questions, which is what AI Skill allows you to do.
How do I configure AI Skill?
You should expect to handle some necessary configuration steps before the AI skill works properly. An AI skill can often provide out-of-the-box answers to reasonable questions, but it could provide incorrect answers for your specific situation. These incorrect answers typically occur because the AI is missing context about your company, setup, or definition of key terms. To solve the problem, you can customize it:
- Focus the AI: Select the data you want the AI to access, to focus its scope on specific tables in your databases.
- Configure through instructions: Provide instructions in English via “Notes for model” to guide the AI to follow rules or definitions. For example: “Whenever I ask about ‘the most sold’ products or items, the metric of interest is total sales revenue, and not order quantity” or “The primary table to use is the FactInternetSales – only use FactResellerSales if explicitly asked about resales or when asked about total sales”. This would be especially useful if table or field names in your database are cryptic, and you can provide better descriptions – “The table T116 contains customer data”.
- Configure through examples: Give example question and query pairs via “Example SQL queries” that the AI can use to answer similar questions. You will have a “question” section and a corresponding “SQL query” section that you will populate. For example: In the question section enter “What was the largest shipping delay in days?” and in the SQL Query section enter “Select max(datediff(day, OrderDate, ShipDate)) as LargestShippingDelayInDays from dbo.factinternetsales”.
What is the difference between AI Skill and Copilot?
The technology behind the AI skill and Fabric Copilot is similar. They both use Generative AI to reason over data. However, they have some key differences:
- Configuration: With an AI skill, you can configure the AI to behave the way you need. You can provide it with instructions and examples that tune it to your specific use case. A Fabric Copilot doesn’t offer this configuration flexibility.
- Use Case: A Copilot can help you do your work in Fabric. It can help you generate Notebook code or Data Warehouse queries. In contrast, the AI skill operates independently, and you can eventually connect it to Microsoft Teams and other areas outside of Fabric.
To summarize AI Skill in a couple of sentences: it creates your own conversational Q&A system that allows you to ask plain English questions that, via LLMs, are turned into T-SQL queries which it executes on your structured data and returns the results that answer the question. You can improve the answers via model notes and SQL examples sent to the LLM. Basically, it’s using RAG on one of the GPT models to pass metadata, model notes and example SQL queries to the LLM. It’s Copilot on your data!
Currently you can only use the interface in Fabric for AI Skill, but eventually there will be integration with Copilot Studio and M365 chat.
The AI Skill experience is now available for all customers when using Fabric F64 or larger capacity. Please note that your tenant admin must enable this preview experience and the Fabric AI setting before you can try it out. Also, check out the current AI Skill limitations.
Click here to learn more about AI Skill. You can setup an environment to demo AI Skill via AI skill example with the AdventureWorks dataset (preview). Of note in this demo is that it creates a lakehouse using AdventureWorksDW which can be very useful to demo other features in Fabric.
This is an amazing new feature, and we are now at the point of generative AI working on structured data and not just text!
More info:
Microsoft Fabric: AI Skills Preview! Build RAG Patterns Simple and Easy!! (video)
The post Microsoft Fabric AI Skill first appeared on James Serra's Blog.