谷歌地图定位功能:现已登陆Gemini API平台
内容来源:https://blog.google/technology/developers/grounding-google-maps-gemini-api/
内容总结:
谷歌地图数据服务正式接入Gemini人工智能平台。谷歌公司近日宣布,其Gemini API平台已集成谷歌地图工具,开发者现可将2.5亿个地理坐标数据与AI推理能力相结合,打造具有空间感知能力的智能应用。
这项名为"基于谷歌地图的实体定位"服务,与早前推出的搜索引擎数据服务形成互补,可为涉及地理位置信息的查询提供实时数据支持。在演示案例中,当用户提出"规划旧金山一日游,要参观金门大桥、博物馆并享用晚餐"的需求时,系统能自动生成包含景点距离、营业时间等细节的完整行程。
该服务具备三大核心功能:可实现多地点智能规划的行程编排系统;基于指定位置推送个性化推荐的定位服务;以及通过分析用户评论等数据解答具体场所细节的问答能力。开发者还可同时启用搜索引擎数据服务,使AI既能获取地图提供的营业时间等结构化数据,又能整合网络新闻等动态信息。
目前该项服务已全面开放,支持最新Gemini系列模型。开发者可通过官方文档和演示程序快速入门,在旅游、房地产、零售物流等领域构建更智能的定位服务应用。
中文翻译:
谷歌地图数据对接功能正式上线Gemini API平台。今日我们正式在Gemini API中推出谷歌地图工具,开发者可将应用程序与地图数据深度集成。通过连接Gemini的推理能力与覆盖超2.5亿地点的数据库,开发者将能打造新一代具备地理空间感知能力的智能产品。与谷歌搜索数据对接功能类似,当查询涉及位置信息时,谷歌地图数据对接可为模型提供丰富且实时的地理数据。
您可通过下方Google AI Studio演示视频直观了解该功能,也可直接访问平台体验应用,并通过重组代码添加更多工具与界面元素。
快速入门
只需在Gemini API请求中启用谷歌地图数据对接功能即可开始使用。
以下是通过Python SDK调用的示例:
为便于可视化地图返回结果,您还可使用上下文令牌获取交互组件,并选择性地将其嵌入应用界面。用户将获得包含相关照片、评价等信息的熟悉体验。
下图展示了该工具返回的谷歌地图组件示例。
通过数据对接提升模型响应质量
开发者可借助此功能在旅游、房地产、零售和物流领域打造更直观高效的服务。当检测到查询包含地理语境时,模型会自动调用谷歌地图数据生成精准回应。系统将综合地点信息及用户评价等相关内容生成答复,您还可通过指定经纬度坐标实现区域精准定位。
典型应用场景包括:
- 精细化行程规划:超越简单地点罗列,旅行类应用能生成包含距离、行程时间及本地详情的全天计划。例如用户询问“帮我规划旧金山一日游,要参观金门大桥、博物馆并享用晚餐”,即可获得包含实时营业时间和节假日信息的完整可行方案。
- 超本地化个性推荐:根据用户偏好与指定位置提供定制建议。房地产应用可通过识别周边游乐场、学校和公园,帮助家庭寻找适合儿童居住的租赁房源。
- 本地化地点问答:通过整合用户评价等地图数据,解答特定位置的详细问题。例如“第一大道和主街交叉口的咖啡馆有露天座位吗?”这类查询现在能获得基于地图数据的准确回答。
组合使用地图与搜索数据对接
为打造功能最强大、语境感知最敏锐的应用程序,您可在同一请求中同时启用谷歌地图与谷歌搜索数据对接功能。
- 谷歌地图提供地址、营业时间、用户评分等结构化事实数据
- 谷歌搜索则提供来自全网的事件安排、新闻资讯等描述性实时信息
例如当询问“Beale街现场音乐表演”时,组合工具可让模型既调用地图数据获取场馆营业时间,又通过搜索数据查询夜场演出的具体开始时间。内部评估表明,同时使用两种工具能显著提升响应质量。
立即开始构建
谷歌地图数据对接功能现已全面开放。该工具支持我们最新模型,您可根据应用需求灵活平衡性能与成本(详见工具定价)。
您现在即可着手开发:查阅技术文档了解更多信息,或在Google AI Studio中重组演示应用。您还可通过Gemini API代码示例库探索谷歌搜索与地图数据对接的更多应用方案。
英文来源:
Grounding with Google Maps: Now available in the Gemini API
Today we’re launching the Google Maps tool in the Gemini API, allowing developers to ground their applications in Maps data. This allows developers to connect Gemini's reasoning capabilities with data from more than 250 million places, allowing a new class of powerful, geospatial-aware AI products. Just like Grounding with Google Search, Grounding with Google Maps provides rich, up-to-date data to the model for any query where location information is helpful.
See the feature in action in the demo video below in Google AI Studio. You can check out the app in Google AI Studio and remix it to add additional tools, UI elements and more.
Get started
To get started, enable the Grounding with Google Maps tool in your Gemini API request.
Here is an example using the Python SDK:
To make it easier to visualize grounded Maps results, you can also use the returned context token to retrieve an interactive widget that you may optionally render in your application UI, giving users a familiar experience complete with relevant photos, reviews and other details.
Here's an example of the Google Maps widget returned by the tool.
Improve model responses with grounding data
Developers can use Grounding with Google Maps to create more intuitive and helpful experiences across travel, real estate, retail and logistics. The model automatically detects when a query has geographical context and uses Google Maps data to provide a grounded response. Google Maps uses data from places, and other related content like user reviews, as sources to help generate the response. You can provide latitude and longitude coordinates to localize search results to specific geographic locations.
Here are a few ways you can use this:
- Detailed itinerary planning: Go beyond a simple list of places. A travel app can now generate a full day’s plan, complete with distance, travel time and local details. A user could ask, "Plan a day in San Francisco for me. I want to see the Golden Gate Bridge, visit a museum and have a nice dinner," and receive a complete, workable itinerary that includes up-to-date business and holiday hours.
- Hyper-local personalized recommendations: Offer tailored recommendations based on your user’s preferences and the location you designate. A real estate app could help a family find rental listings in kid-friendly neighborhoods by identifying nearby playgrounds, schools and parks.
- Local place-based answers: Answer detailed questions about a specific location by pulling insights derived from sources like user reviews and other Maps data. A query like, "Does the cafe on the corner of 1st and Main have outdoor seating?" can now receive a Maps grounded answer.
Combine Grounding for Maps and Search
For the most powerful and contextually aware applications, you can enable both Grounding with Google Maps and Grounding with Google Search in the same request. - Google Maps provides grounding with structured, factual data like addresses, hours and user ratings.
- Google Search provides descriptive, timely context from across the web, like event schedules, news and articles.
For example, when asked about “live music on Beale Street”, combining tools allows the model to use Maps data for a venue's operating hours and Search data to find the specific start times for evening shows. Internal evaluations show that using both tools together results in a significant improvement in response quality compared to using either alone.
Start building today
Grounding with Google Maps is generally available now. The tool is supported by our latest models, giving you the flexibility to choose the right balance of performance and cost for your application (see tool pricing).
You can start building with Grounding on Google Maps today: Check out the documentation to learn more or remix the demo app in Google AI Studio. You can also explore Grounding with Google Search and Maps in the Gemini API Cookbook.
文章标题:谷歌地图定位功能:现已登陆Gemini API平台
文章链接:https://www.qimuai.cn/?post=1634
本站文章均为原创,未经授权请勿用于任何商业用途