Stay organized with collections
Save and categorize content based on your preferences.
This document describes how Gemini in Colab Enterprise, which is part of
Gemini for Google Cloud, 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 (Preview):
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.
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.
Explain code cells (Preview):
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.
Explain and fix errors (Preview):
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.
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.
Models are trained so that Gemini in Colab Enterprise responses are as useful to
Gemini in Colab Enterprise users as possible.
To chat about your notebook with Gemini,
open a Colab Enterprise notebook, and then click the
sparkShow
Gemini button. Start discussing your notebook in the chat dialog.
To use code completion, start typing in a code cell to see
code completion suggestions.
To use code generation, click
sparkAvailable
AI features, and then click Generate code.
Enter a description of the code that you want to generate, and then
press Enter.
To get explanations of code cells, go to the
cell that you want to explain, click
sparkAvailable
AI features, and then click Explain code.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eGemini in Colab Enterprise provides AI-powered assistance for writing code within notebooks, using large language models (LLMs) trained on publicly available code, Google Cloud-specific material, and other technical information.\u003c/p\u003e\n"],["\u003cp\u003eUsers can generate Python code with Gemini in Colab Enterprise, which suggests code segments as you type and offers a \u003cstrong\u003eHelp me code\u003c/strong\u003e tool for generating code based on a description.\u003c/p\u003e\n"],["\u003cp\u003eIt is recommended to validate all output from Gemini for Google Cloud products, as they may generate responses that appear plausible but are factually incorrect due to being an early-stage technology.\u003c/p\u003e\n"],["\u003cp\u003eYou can learn how to setup Gemini, use the coding assistance, and understand how data is used through the linked documentation in this content.\u003c/p\u003e\n"]]],[],null,["# Gemini in Colab Enterprise\n\nThis document describes how Gemini in Colab Enterprise, which is part of\n[Gemini for Google Cloud](/gemini/docs/overview), provides\nAI-powered assistance to help you write and edit code in notebooks.\n\nAI assistance with Gemini in Colab Enterprise\n---------------------------------------------\n\nGemini in Colab Enterprise provides AI assistance to help you do the following:\n\n- **Chat about your notebook** ([Preview](/products#product-launch-stages)): 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](/colab/docs/chat).\n- **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](/colab/docs/use-code-completion).\n- **Explain code cells** (Preview): 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](/colab/docs/explain-cells).\n- **Explain and fix errors** (Preview): 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](/colab/docs/explain-errors).\n\nThe 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.\n\nLearn [how and when Gemini\nfor Google Cloud uses your data](/gemini/docs/discover/data-governance).\n| As an early-stage technology, Gemini for Google Cloud\n| products can generate output that seems plausible but is factually incorrect. We recommend that you\n| validate all output from Gemini for Google Cloud products before you use it.\n| For more information, see\n| [Gemini for Google Cloud and responsible AI](/gemini/docs/discover/responsible-ai).\n\nWhere to interact with Gemini\n-----------------------------\n\nAfter you [set up Gemini in Colab Enterprise](/gemini/docs/colab/set-up-gemini), you\ncan use Gemini in Colab Enterprise to do the following in Colab Enterprise:\n\n- To [chat about your notebook with Gemini](/colab/docs/chat), open a Colab Enterprise notebook, and then click the spark **Show\n Gemini** button. Start discussing your notebook in the chat dialog.\n- To\n [use code completion and code generation](/colab/docs/use-code-completion),\n do any of the following:\n\n - To use code completion, start typing in a code cell to see code completion suggestions.\n - To use code generation, click spark **Available\n AI features** , and then click **Generate code** . Enter a description of the code that you want to generate, and then press \u003ckbd\u003eEnter\u003c/kbd\u003e.\n- To [get explanations of code cells](/colab/docs/explain-cells), go to the\n cell that you want to explain, click\n spark **Available\n AI features** , and then click **Explain code**.\n\n- To [explain and fix errors](/colab/docs/explain-errors), do any of the\n following:\n\n - To use a suggested fix for a syntax error, click the **Fix error** button, and then accept the suggested edit.\n - To get an explanation of an error, click the **Explain error** button.\n\nSet up Gemini in Colab Enterprise\n---------------------------------\n\nFor detailed setup steps, see\n[Set up Gemini in Colab Enterprise](/gemini/docs/colab/set-up-gemini).\n\nWhat's next\n-----------\n\n- See the latest enhancements and fixes in [release notes](/gemini/docs/release-notes).\n- Learn how to [set up Gemini in Colab Enterprise](/gemini/docs/colab/set-up-gemini).\n- Learn how to [write code with Gemini assistance](/colab/docs/use-code-completion).\n- Learn how [Gemini for Google Cloud uses your data](/gemini/docs/discover/data-governance).\n- Learn more about [Google Cloud compliance](/security/compliance)."]]