# Gemini in Colab Enterprise

This document describes how Gemini in Colab Enterprise, which is part of
[Gemini for Google Cloud](https://docs.cloud.google.com/gemini/docs/overview.md.txt), provides
AI-powered assistance to help you write and edit code in notebooks.

## AI assistance with Gemini in Colab Enterprise

Gemini in Colab Enterprise provides AI assistance to help you do the following:

- **Chat about your notebook** : Use a chat dialog to help you understand and develop your notebook. You can chat with Gemini about potential coding solutions or how to do specific tasks in your notebook. You can also get explanations of the code in a notebook. For more information, see [Chat about your notebook with Gemini](https://docs.cloud.google.com/colab/docs/chat.md.txt).
- **Write code by using code completion and code generation** : Gemini in Colab Enterprise suggests code segments while you type in a code cell. You can also use Gemini in Colab Enterprise to generate code based on a description of what you want. For more information, see [Use code completion and code generation](https://docs.cloud.google.com/colab/docs/use-code-completion.md.txt).
- **Explain code cells** : Use Gemini in Colab Enterprise to get explanations of code cells. The explanations can include sources and suggested improvements to the code. Use the chat dialog to ask follow-up questions. For more information, see [Explain code cells](https://docs.cloud.google.com/colab/docs/explain-cells.md.txt).
- **Explain and fix errors** : Gemini in Colab Enterprise suggests fixes for syntax errors and provides explanations of other errors. The explanations can include sources and suggested code snippets for resolving the error. Use the chat dialog to ask follow-up questions. For more information, see [Explain and fix errors](https://docs.cloud.google.com/colab/docs/explain-errors.md.txt).

The Gemini large language models (LLMs) that are used by
Gemini in Colab Enterprise are trained on datasets of publicly available code,
Google Cloud-specific material, and other relevant technical information
in addition to the datasets used to train the Gemini
[foundation models](https://storage.googleapis.com/deepmind-media/gemini/gemini_1_report.pdf).
Models are trained so that Gemini in Colab Enterprise responses are as useful
to Gemini in Colab Enterprise users as possible.

Learn [how and when Gemini
for Google Cloud uses your data](https://docs.cloud.google.com/gemini/docs/discover/data-governance).

> [!CAUTION]
> As an early-stage technology, Gemini for Google Cloud
> products can generate output that seems plausible but is factually incorrect. We recommend that you
> validate all output from Gemini for Google Cloud products before you use it.
> For more information, see
> [Gemini for Google Cloud and responsible AI](https://docs.cloud.google.com/gemini/docs/discover/responsible-ai.md.txt).

## Where to interact with Gemini

After you [set up Gemini in Colab Enterprise](https://docs.cloud.google.com/colab/docs/gemini-in-colab/set-up-gemini.md.txt), you
can use Gemini in Colab Enterprise to do the following in Colab Enterprise:

- To [chat about your notebook with Gemini](https://docs.cloud.google.com/colab/docs/chat.md.txt), open a Colab Enterprise notebook, and then click the **Show
  Gemini** button. Start discussing your notebook in the chat dialog.
- To
  [use code completion and code generation](https://docs.cloud.google.com/colab/docs/use-code-completion.md.txt),
  do any of the following:

  - To use code completion, start typing in a code cell to see code completion suggestions.
  - To use code generation, click **Available
    AI features** , and then click **Generate code** . Enter a description of the code that you want to generate, and then press <kbd>Enter</kbd>.
- To [get explanations of code cells](https://docs.cloud.google.com/colab/docs/explain-cells.md.txt), go to the
  cell that you want to explain, click
  **Available
  AI features** , and then click **Explain code**.

- To [explain and fix errors](https://docs.cloud.google.com/colab/docs/explain-errors.md.txt), do any of the
  following:

  - To use a suggested fix for a syntax error, click the **Fix error** button, and then accept the suggested edit.
  - To get an explanation of an error, click the **Explain error** button.

## Set up Gemini in Colab Enterprise

For detailed setup steps, see
[Set up Gemini in Colab Enterprise](https://docs.cloud.google.com/colab/docs/gemini-in-colab/set-up-gemini.md.txt).

## What's next

- See the latest enhancements and fixes in [release notes](https://docs.cloud.google.com/gemini/docs/release-notes.md.txt).
- Learn how to [set up Gemini in Colab Enterprise](https://docs.cloud.google.com/colab/docs/gemini-in-colab/set-up-gemini.md.txt).
- Learn how to [write code with Gemini assistance](https://docs.cloud.google.com/colab/docs/use-code-completion.md.txt).
- Learn how [Gemini for Google Cloud uses your data](https://docs.cloud.google.com/gemini/docs/discover/data-governance.md.txt).
- Learn more about [Google Cloud compliance](https://cloud.google.com/compliance).