Conversational Analytics API: פיתוח סוכני נתונים וצ'אט עם הנתונים
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מפתחים יכולים להשתמש ב-Conversational Analytics API, שאפשר לגשת אליו דרך geminidataanalytics.googleapis.com, כדי ליצור ממשק צ'אט מבוסס-AI או סוכן נתונים, שמשיבים על שאלות לגבי נתונים מובְנים ב-BigQuery, ב-Looker וב-Looker Studio באמצעות שפה טבעית. באמצעות Conversational Analytics API, אתם מספקים לסוכנות הנתונים פרטים ונתונים עסקיים ('הקשר'), וגם גישה לכלים כמו SQL, Python וספריות להצגת נתונים. התשובות של הנציג מוצגות למשתמש, וניתן לתעד אותן ביומן של אפליקציית הלקוח, וכך ליצור חוויית צ'אט חלקה וניתנת לבקרה של נתונים.
אחרי שתשלימו את השלבים הקודמים, תוכלו להשתמש ב-Conversational Analytics API כדי ליצור סוכן נתונים ולנהל איתו אינטראקציה. לשם כך, פועלים לפי השלבים הבאים:
יצירת סוכן נתונים באמצעות HTTP: דוגמה מלאה ליצירה של סוכן נתונים וליצירת אינטראקציה איתו באמצעות בקשות HTTP ישירות ב-Python.
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["התוכן קשה להבנה","hardToUnderstand","thumb-down"],["שגיאות בקוד לדוגמה או במידע","incorrectInformationOrSampleCode","thumb-down"],["חסרים לי פרטים או דוגמאות","missingTheInformationSamplesINeed","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-06-11 (שעון UTC)."],[],[],null,["# Conversational Analytics API: Build data agents and chat with your data\n\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n| **Important:** The Data QnA API is deprecated. If you're migrating from the Data QnA API, see the [migration guide](/gemini/docs/conversational-analytics-api/migration-guide) for an overview of key differences and required migration steps.\n\nDevelopers can use the Conversational Analytics API, which is accessed through `geminidataanalytics.googleapis.com`, to build an artificial intelligence (AI)-powered chat interface, or data agent, that answers questions about structured data in BigQuery, Looker, and Looker Studio using natural language. With the Conversational Analytics API, you provide your data agent with business information and data (\"context\"), as well as access to tools such as SQL, Python, and visualization libraries. These agent responses are presented to the user and can be logged by the client application, creating a seamless and auditable data chat experience.\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| **Note:** Pre-GA Preview offerings (1) are intended for use in test environments only and shouldn't be used in a production environment or to process personal data or other data subject to legal or regulatory compliance requirements, and (2) are subject to the Pre-GA Offerings Terms of the [Service Specific Terms](/terms/service-terms#1), and the [Consent Addendum for Gemini for Google Cloud Trusted Tester Program](/trusted-tester/gemini-for-google-cloud-preview).\n\nGet started with the Conversational Analytics API\n-------------------------------------------------\n\nTo start using the Conversational Analytics API, you can first review the [architecture and key concepts](/gemini/docs/conversational-analytics-api/key-concepts) documentation to understand how agents process requests, the workflows for agent creators and users, conversation modes, and Identity and Access Management (IAM) roles. Then, to start building data agents, you can choose between a guided experience with the [Colaboratory notebooks](#interactive-colab-notebooks) or a self-driven approach by following the steps in [Setup and prerequisites](#setup).\n\n### Interactive Colaboratory notebooks\n\nFor an interactive, step-by-step guide to setting up your environment, building a data agent, and making API calls, see the following Colaboratory notebooks:\n\n- [Conversational Analytics API HTTP Colaboratory notebook](https://colab.research.google.com/github/GoogleCloudPlatform/generative-ai/blob/main/agents/gemini_data_analytics/intro_gemini_data_analytics_http.ipynb)\n- [Conversational Analytics API SDK Colaboratory notebook](https://colab.research.google.com/github/GoogleCloudPlatform/generative-ai/blob/main/agents/gemini_data_analytics/intro_gemini_data_analytics_sdk.ipynb)\n\n### Setup and prerequisites\n\nBefore you use the API or the examples, complete the following steps:\n\n- [Enable the Conversational Analytics API](/gemini/docs/conversational-analytics-api/enable-the-api): Describes prerequisites to enable the Conversational Analytics API.\n- [Grant Conversational Analytics API IAM roles and permissions](/gemini/docs/conversational-analytics-api/access-control): Describes the predefined IAM roles for managing access to data agents.\n- [Authenticate and connect to a data source with the Conversational Analytics API](/gemini/docs/conversational-analytics-api/authentication): Provides instructions for authenticating to the API and configuring connections to your BigQuery, Looker, and Looker Studio data.\n\n### Build and interact with a data agent\n\nAfter completing the previous steps, use the Conversational Analytics API to build and interact with a data agent by following these steps:\n\n- [Build a data agent using HTTP](/gemini/docs/conversational-analytics-api/build-agent-http): Provides a complete example of building and interacting with a data agent by using direct HTTP requests with Python.\n- [Build a data agent using the Python SDK](/gemini/docs/conversational-analytics-api/build-agent-sdk): Provides a complete example of building and interacting with a data agent by using the Python SDK.\n- [Write effective system instructions](/gemini/docs/conversational-analytics-api/data-agent-system-instructions): Learn how to structure the YAML content for the `system_instruction` parameter to guide agent behavior and improve response accuracy. You can also view examples of system instructions in [BigQuery data sources](/gemini/docs/conversational-analytics-api/data-agent-authored-context-bq) and in [Looker data sources](/gemini/docs/conversational-analytics-api/data-agent-authored-context-looker).\n- [Render a Conversational Analytics API agent response as a visualization](/gemini/docs/conversational-analytics-api/render-visualization): Provides an example of processing chart specifications from API responses and rendering them as visualizations by using the Python SDK and the Vega-Altair library.\n\nBest practices\n--------------\n\n- [Manage BigQuery costs for your agents](/gemini/docs/conversational-analytics-api/manage-costs): Learn how to monitor and manage BigQuery costs for your Conversational Analytics API agents by setting project-level, user-level, and query-level spending limits.\n\nKey API operations\n------------------\n\nThe API provides the following core endpoints for managing data agents and conversations:\n\nSend feedback\n-------------\n\nUse the following links to file a bug or request a feature.\n\n- [File a bug report](https://issuetracker.google.com/issues/new?component=1747873&template=2128893)\n- [File a feature request](https://issuetracker.google.com/issues/new?component=1747873&template=2131795)\n\nSend feedback\n-------------\n\nUse the following links to file a bug or request a feature.\n\n- [File a bug report](https://issuetracker.google.com/issues/new?component=1747873&template=2128893)\n- [File a feature request](https://issuetracker.google.com/issues/new?component=1747873&template=2131795)\n\nAdditional resources\n--------------------\n\n- [Conversational Analytics API reference documentation](/gemini/docs/conversational-analytics-api/reference/rest): Provides detailed descriptions of methods, endpoints, and type definitions for request and response structures.\n- [Troubleshoot Conversation Analytics API errors](/gemini/docs/conversational-analytics-api/troubleshoot-ca-errors): Troubleshoot common Conversation Analytics API errors."]]