Add AI-generated comments to a table
This article introduces AI-generated table and column comments (also known as AI-generated documentation), explains how they work, shows how to add and edit them, and answers frequently asked questions.
How do AI-generated comments work?
As a table owner or user with permission to modify a table, you can use Catalog Explorer to view and add an AI-generated comment for any table or table column managed by Unity Catalog. Comments are powered by a large language model (LLM) that takes into account the table metadata, such as the table schema and column names.
AI-generated comments provide a quick way to help users discover data managed by Unity Catalog.
Important
AI-generated comments are intended to provide a general description of tables and columns based on the schema. The descriptions are tuned for data in a business and enterprise context, using example schemas from several open datasets across various industries. The model was evaluated with hundreds of simulated samples to verify it avoids generating harmful or inappropriate descriptions.
AI models are not always accurate and comments must be reviewed prior to saving. Databricks strongly recommends human review of AI-generated comments to check for inaccuracies. The model should not be relied on for data classification tasks such as detecting columns with PII.
Users with the USE SCHEMA
and SELECT
privileges on the table can view comments once they are added.
For information about the models that are used to generate comment suggestions, see Frequently asked questions about AI-generated table comments.
Before you begin
Before you can use AI-generated comments, a workspace admin must enable Azure AI services-powered assistive features:
- In Settings, go to the Advanced tab and scroll down to the Other section.
- Turn on the Azure AI services-powered AI assistive features option.
Add AI-generated comments
You must use Catalog Explorer to view suggested comments, edit them, and add them to tables and columns.
Permissions required: You must be the table owner or have the MODIFY
privilege on the table to view the AI-suggested comment, edit it, and add it.
Add an AI-suggested comment to a table
In your Azure Databricks workspace, click Catalog.
Search or browse for the table and select it.
View the AI Suggested Comment field in the About this table panel.
The AI might take a moment to generate the comment.
Click Accept to accept the comment as-is, or Edit to modify it before you save it.
Add an AI-suggested comment to a column
In your Azure Databricks workspace, click Catalog.
Search or browse for the table and select it.
Above the table column headings, click the AI generate button.
A comment is generated for each column.
Click the check mark next to the column comment to accept it or close it unsaved.
Update an AI-generated comment
The table owner or user with the MODIFY
privilege on the table can update table and column comments at any time, using the Catalog Explorer UI or SQL commands (ALTER TABLE or COMMENT ON).
Frequently asked questions about AI-generated table comments
This section provides general information about AI-generated table comments (also know as AI-generated documentation) in the form of frequently asked questions.
What services does the AI-generated documentation feature use?
AI-generated comments may use Azure AI services to provide responses. Data sent to these services is not used for model training. The models themselves are stateless: no prompts or completions are stored by model providers.
What regions are model-serving endpoints hosted in?
For European Union (EU) workspaces, AI-assistive features use an external model hosted in the EU. All other regions use a model hosted in the US.
How is data encrypted between Azure Databricks and Azure AI services?
Traffic between Databricks and Azure AI services is encrypted in transit using industry standard TLS 1.2 encryption.
Is everything encrypted at rest?
Any data stored within an Azure Databricks workspace is AES-256 bit encrypted. Our external partners do not store any prompts or completions sent to them.
What data is sent to the models?
Azure Databricks sends the following metadata to the models with each API request:
- Table schema (catalog name, schema name, table name, current comment)
- Column names (column name, type, primary key or not, current column comment)
Approved table or column comments are stored in the Azure Databricks control plane database, along with the rest of the Unity Catalog metadata. The control plane database is AES-256 bit encrypted.
What legal terms govern the use of AI-generated comments?
Usage is governed by the existing Azure Databricks terms and conditions the customer has agreed to when using Azure Databricks.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for