Duet AI in Google Cloud overview

Duet AI in Google Cloud is an always-on collaborator that offers generative AI-powered assistance to a wide range of Google Cloud users, including developers, data scientists, and operators. To provide an integrated assistance experience, Duet AI is embedded in many Google Cloud products.

What Duet AI can do

Duet AI provides the following types of assistance in the context of your work:

  • Assisted development. Using natural language, you can prompt Duet AI to assist you with coding in many popular languages — for example, to provide context-sensitive code completion, generate functions in real time, generate test plans, get help with debugging code, and make your code more readable.

    Duet AI provides contextualized responses to your prompts, including source citations regarding which documentation and code samples Duet AI used to generate its responses.

  • Assisted data analysis. In BigQuery and Cloud Spanner, Duet AI provides contextual SQL statement completion and SQL infilling for functions and keywords with syntax suggestions. Duet AI helps you onboard to new datasets by generating and iterating SQL queries using natural language statements. You can interpret complicated query syntax through natural language summaries. Duet AI transitions SQL content into visual development by using an integrated Colab experience in BigQuery and Duet AI code generation.

  • Assisted operations. When you use Duet AI in the Google Cloud console, you can ask natural language questions about Google Cloud. Duet AI suggests prompts to help start the conversation, and it supports multi-turn prompts and responses. The Duet AI conversational experience supports all levels of Google Cloud users and covers all Google Cloud products and services. You can get help from Duet AI by asking "what is…?" or "how do I…?" You can also ask more complex questions like "what are best practices for…?" It can also provide summaries of complex log entries in Cloud Logging and errors in Error Reporting to help you to understand and troubleshoot issues.

Duet AI uses large language models (LLMs) that are developed by Google. The LLMs are fine-tuned with billions of lines of open source code, security data, and Google Cloud-specific content such as documentation and sample code. Duet AI does not use your prompts to train its models. For more information, see How Duet AI in Google Cloud uses your data.

Where to interact with Duet AI

After you set up Duet AI for a Google Cloud project, you can ask for assistance in a few places:

  • The Duet AI pane in the Google Cloud console
  • Specific Google Cloud product pages in the Google Cloud console
  • Your IDE

Duet AI pane

After you set up Duet AI, chat_spark Duet AI appears in the Google Cloud console toolbar. When you click this icon, the Duet AI pane (a conversational assistant) is displayed. The conversational assistant pane persists across pages in the console so that you can keep the conversation going as you work. For more information, see Try Duet AI in the Google Cloud console.

Google Cloud products in the console

Duet AI can offer assistance within some Google Cloud products. The type of assistance depends on the product.

For example, after you set up Duet AI for a project in BigQuery, pen_spark Duet AI appears in the BigQuery query editor toolbar. You can click this icon to select Duet AI features that help you generate, complete, or understand queries.

Duet AI icon appears in the BigQuery query

For more information, see Write queries with Duet AI assistance.


If you use the Cloud Code plugin in your IDE, chat_spark Duet AI appears in the IDE after you set up Duet AI. You can click this icon to display the conversational assistant.

After you select code in your editor, you can enter prompts such as the following:

  • "Write unit tests for my code."
  • "Help me debug my code."
  • "Make my code more readable."

Duet AI also lets you generate code or receive code completions in the code editor.

For more information, see Code with Duet AI assistance.

Supported products

The following table shows what products support what type of generative-AI assistance. The table also provides links to product documentation.

Activity type Assistance type Product documentation
Assisted application development
  • Generate and debug code.
  • Generate unit tests.
Assisted data analysis
  • Generate SQL.
Assisted operations
  • Answer questions about Google Cloud products.
  • Offer suggestions for best practices and optimization.
  • Summarize log entries.
  • Troubleshoot error messages.

What's next