Extract insights from your maps with AI Agents
Last updated
Was this helpful?
Last updated
Was this helpful?
This feature is currently in Public Preview for SaaS organizations. We're already working of our next version of faster, smarter and more powerful AI Agents for maps. Stay tuned!
With CARTO Builder, you can effortlessly create AI Agents that empower end-users to explore and extract valuable insights from your maps. In this tutorial, you’ll learn how to enable AI Agents in your CARTO platform, configure them using best practices, and interact with them effectively. We’ll also provide example prompts and highlight the current capabilities of AI Agents to help you get the most out of this feature.
Steps:
Enable AI Agents in your organization
Create a map using PLUTO data in Builder
Set up an AI Agent in Builder
Accessing AI Agents as end-user
To enable AI Agents in your organization you must be an Admin user.
Login to your CARTO organization and navigate to Settings > Customizations section and choose AI Agents tab.
Use the toggle button to enable AI Agents in your CARTO platfrom. Once enabled, Editor users in your organization can add an AI Agent to any Builder map.
In this section, we will create a Builder map showcasing the PLUTO dataset for Manhattan and demonstrate how to create an AI Agent that allows end-users to extract information effortlessly. This AI Agent will enable users to explore land use, zoning details, building attributes, and other key insights from the map.
Access the Maps section from your CARTO Workspace using the navigation menu and create a new map using the button at the top right of the page. This will open the Builder in a new tab.
Name your Builder map "Exploring Manhattan buildings" and using Add Source button navigate to CARTO Data Warehouse > carto-demo-data > demo_tables and add manhattan_pluto_data
table.
Rename your layer "Buildings" and style the Fill Color using yearbuilt
property using sunset
palette. Set the Stroke Color to dark purple
and the Stroke Weight fixed to 0,5 pixels
.
Now, we will add Widgets to empower users and the AI Agent to dynamically extract insights from your source. They also serve to filter data based on the map viewport and interconnected widgets.
First, add a Formula Widget to display the total number of buildings in the entire dataset. To do so, navigate to the Widgets tab, select Formula Widget, and set the configuration as follows:
Operation: COUNT
Behaviour: Global
Add another Formula Widget, this time to display the total number of buildings in the map extent (known as viewport) and set the configuration as follows:
Operation: COUNT
Behaviour: Filter by viewport
To display the distribution of buildings' number of floors, add a Histogram Widget and set the configuration as follows:
Column: numfloors
Behaviour: Global
Add another Histogram Widget to display the distribution of buildings' total units in the viewport. Set the configuration as follows:
Column: yearbuilt
Behaviour: Global
Finally, add a Category Widget to display the buildings grouped by land use type and configure this widget as follows:
Column: landuse
Behaviour: Global
Your map should look similar to the example below. When configuring widgets, make sure to set up the appropriate formatting to enhance readability and add notes or descriptions to provide context for end-users. This will help users and the AI Agent extract valuable insights and interact with the map effortlessly.
Learn how to configure an AI Agent in Builder to enhance your map’s interactivity. By linking it to your map, you enable end-users to ask questions, extract insights, and explore data effortlessly.
First, enable the AI Agent by toggling the switch located at the top of the AI panel.
Provide the AI Agent with additional context of the map using the Map Context section.
Using Map Context section, you have the flexibility to provide additional instructions to enhance the AI Agent's responses. While the AI Agent already has access to your map's configuration—such as layer styling, widget settings, and other components—it uses this information to deliver relevant answers to end-users.
This section is optional, but adding custom instructions allows you to tailor the AI Agent’s behavior to align more closely with your specific use case. These inputs will help the AI Agent offer more precise, insightful interactions when engaging with end-users.
For this example, we will include the following:
Styling guidelines to ensure a consistent and visually coherent map presentation.
A detailed description of the Land Use classification, based on the NYC Department of City Planning, as this information is not directly included in the dataset.
You can use the sample text provided below or customize it to suit your specific requirements, ensuring the AI Agent meets the unique needs of your map.
The Conversation Starters provide end-users with common prompts that the AI Agent can respond to, making interactions more intuitive and engaging. In our case, we will include the following four questions as conversation starters:
What is this map?
Show open spaces on the map.
Highlight residential areas in Manhattan.
Display all commercial buildings in Times Square.
Finally, you have the option to include a User Guide to customize the explanation displayed when the Agent greets your end-users. In our case, we'll add the following explanation:
Before publishing the map, we'll define Map settings for viewers, enabling the following functionalities:
Feature selection tool
Export viewport data
Search location bar
Measure tool
Scroll wheel zoom (enabled by default)
Basemap selector
To publish the map, click on the Share button and share the map with your organization.
AI Agents are not yet supported in Public maps.
To access the AI Agent, copy the map link from the Share window or the Copy link option in the Share quick actions and open it in a new tab. Ensure the link contains /viewer/
to confirm you’re accessing the map in the correct mode.
Once the map loads, the AI Agent will appear at the bottom center of your screen. Click on it to initiate a conversation. The Agent will greet users by displaying the user guide and conversational starter prompts, making it easy to start exploring the map.
In addition to providing text-based answers, the AI Agent has access to several capabilities for interacting with the map and helping users extract insights:
Search and zoom to specific locations.
Extract insights from widgets.
Filter data through widget interactions.
Switch layers on and off.
Retrieve the latitude and longitude of current map position.
For more information on the AI Agent's capabilities, please refer to this section of the documentation.
In the example below, adding the prompt “Display all commercial buildings near Times Square older than 1920” from the interface will instruct the AI Agent to:
Search for and zoom to Times Square.
Filter the map’s buildings to the commercial type, using the land use descriptions provided in the map context and applying the Category widget.
Filter the map’s buildings to those older than 1920, using the available slots in the Histogram widget.
This showcases how the AI Agent dynamically combines map context and widget functionality to provide targeted insights and interactions.
Note: AI Agent responses are generated in real time and may vary slightly depending on the context.
And that's it! You've successfully set up your map with an AI Agent, enabling powerful insights and seamless exploration for your end-users. With AI capabilities integrated into the CARTO platform, you can empower users to extract meaningful information effortlessly.
Stay tuned for upcoming iterations and enhancements to this feature—we're excited to bring even more possibilities to your mapping experience!