{"slug": "introducing-ask-a-new-google-earth-engine-feature-to-accelerate-geospatial", "title": "Introducing Ask, a new Google Earth Engine feature to accelerate geospatial coding", "summary": "Google launched Ask, a new Google Earth Engine feature that integrates Gemini capabilities directly into the Earth Engine Code Editor, letting users write, debug, explain, and optimize geospatial code using their own Gemini API key starting today. Ask draws on the active script, imported assets and geometries, and session chat history, and at launch supports the Gemini 3 Flash Preview, Gemini 3.1 Pro Preview, and Gemini 3.5 Flash models, with optional docs search, dataset search, or Grounding with Google Search. The feature also adds a Troubleshoot button to Console error messages and a side-by-side diff view for reviewing generated code before merging it into a script.", "body_md": "Whether you are mapping global forest cover, detecting changes in the built environment, or monitoring agricultural yields, writing scripts in [Google Earth Engine](https://earthengine.google.com/) is a powerful way to develop these insights. This platform is part of [Google Earth AI](https://ai.google/earth-ai/), our collection of geospatial models and datasets designed to help you transform planetary information into actionable intelligence, and we’ve launched a new feature, Ask, that makes accessing that planetary intelligence even easier. \n\nWe know that translating complex geospatial logic into code takes time, and memorizing specific Google Earth Engine API functions, searching documentation, and debugging syntax or memory errors can interrupt your flow. Ask is designed to help you get to actionable insights faster, by integrating Gemini capabilities directly into the Google Earth Engine Code Editor.\n\nStarting today, you can use your own Gemini API key to write, debug, understand, and optimize geospatial queries without ever leaving the Code Editor.\n\nYou can ask a question directly in the Code Editor, and get a response based on context from your workspace, such as:\n\nThe full text of your active script\n\nYour imported assets and geometries\n\nYour active session chat history\n\nBecause Gemini capabilities in Google Earth Engine automatically understand your work, you don’t have to add code or explain your datasets. It already knows these details, so it can provide more relevant, helpful answers. Additionally, you can automatically view the diff and merge it into your script. No more copy and pasting!\n\nYou can also personalize Ask to make responses more comprehensive and suited to your needs:\n\n**Access the latest Gemini models:** Choose the Gemini model that meets your needs — at launch, the available models are Gemini 3 Flash Preview, Gemini 3.1 Pro Preview, and Gemini 3.5 Flash.\n\n**Docs search:** Use AI to search the official [documentation](https://developers.google.com/earth-engine) for up-to-date syntax and functions.\n\n**Dataset search:** Allow AI to search the [Earth Engine Data Catalog](https://developers.google.com/earth-engine/datasets) to find and reference the exact datasets you need.\n\n**Google Search:** Grounds response in the latest public web results using Grounding with Google Search (mutually exclusive with docs search and dataset search).\n\nNot sure where to start? Here are four ways you can use Ask in your workflows:\n\nNeed to calculate NDVI (“Normalized Difference Vegetation Index”), perform a cloud mask, or build a chart, but can't remember the exact syntax? Just ask and Earth Engine can generate JavaScript code for you. You can review the code directly in the chat and click **Insert** to add it to your script, or **Copy** it to your clipboard. If your editor is not empty, inserting code displays a side-by-side diff view so you can review changes before accepting them.\n\n**Prompt example:** \"Write a script to load Sentinel-2 imagery for 2025 over Boulder, CO, apply a cloud mask, calculate NDVI, and add the median composite to the map.\"\n\nIf you’re working with a script written by a colleague or adapting an example from the community, you can use Gemini capabilities to explain it. Simply ask, \"Explain what this script does,\" and receive a step-by-step breakdown of the logic and Earth Engine functions being used.\n\nDebugging is an inevitable part of coding. When your script throws an error in Google Earth Engine, the Console displays an error message. Now, those messages include a **\"Troubleshoot\"** button. Clicking it automatically populates the Ask panel with a prompt that contains the error message and a request for help to diagnose the issue and suggest a fix.\n\nIf your script is, for example, running slowly, consuming resources inefficiently, throwing \"computation timed out\" or \"too many concurrent aggregations\" errors, ask for optimization tips. Gemini capabilities can suggest best practices like early filtering, reducing computation steps, or converting client-side loops into server-side operations.\n\nAsk is available globally today. To get started, you just need a Gemini API key:\n\n**Get an API key:** If you don’t already have a Gemini API key, head to [Google AI Studio](https://aistudio.google.com/app/apikey) and create one (there are free options; if you choose a paid-tier API key, you will be billed for your usage). Learn more about [Gemini API terms](https://ai.google.dev/terms).\n\n**Add the API key to GEE:** Open the Google Earth Engine Code Editor. On the right-hand panel, click the **Ask** panel. Click the key icon in the bottom left corner and enter your API key.\n\nWe want to hear from you! Please use the Code Editor Feedback button to share your feedback and help us improve the experience.", "url": "https://wpnews.pro/news/introducing-ask-a-new-google-earth-engine-feature-to-accelerate-geospatial", "canonical_source": "https://cloud.google.com/blog/products/data-analytics/accelerate-geospatial-coding-with-ai-in-google-earth-engine/", "published_at": "2026-09-28 16:00:00+00:00", "updated_at": "2026-09-28 16:21:04.522510+00:00", "lang": "en", "topics": ["ai-products", "ai-tools", "generative-ai", "large-language-models", "developer-tools"], "entities": ["Google", "Google Earth Engine", "Ask", "Gemini", "Gemini 3 Flash Preview", "Gemini 3.1 Pro Preview", "Gemini 3.5 Flash", "Google Earth AI"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/introducing-ask-a-new-google-earth-engine-feature-to-accelerate-geospatial", "markdown": "https://wpnews.pro/news/introducing-ask-a-new-google-earth-engine-feature-to-accelerate-geospatial.md", "text": "https://wpnews.pro/news/introducing-ask-a-new-google-earth-engine-feature-to-accelerate-geospatial.txt", "jsonld": "https://wpnews.pro/news/introducing-ask-a-new-google-earth-engine-feature-to-accelerate-geospatial.jsonld"}}