开始使用 Gemini Enterprise

Gemini Enterprise 汇集了功能强大的深度信息检索、先进的自然语言处理和最新的大型语言处理技术进步成果,可以理解用户意图并返回与用户相关度最高的结果。

在学习本教程之前,确保您已完成准备工作中的步骤。


如需在 Google Cloud 控制台中直接遵循有关此任务的分步指导,请点击操作演示

操作演示


准备工作

  1. 登录您的 Google Cloud 账号。如果您是 Google Cloud新手,请 创建一个账号来评估我们的产品在实际场景中的表现。新客户还可获享 $300 赠金,用于运行、测试和部署工作负载。
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Enable the Gemini Enterprise (Discovery Engine), Cloud Storage, Identity and Access Management APIs.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

    Enable the APIs

  5. Make sure that you have the following role or roles on the project: Gemini Enterprise Admin

    Check for the roles

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.

    4. For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.

    Grant the roles

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. Click Grant access.
    4. In the New principals field, enter your user identifier. This is typically the email address for a Google Account.

    5. Click Select a role, then search for the role.
    6. To grant additional roles, click Add another role and add each additional role.
    7. Click Save.
  6. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  7. Verify that billing is enabled for your Google Cloud project.

  8. Enable the Gemini Enterprise (Discovery Engine), Cloud Storage, Identity and Access Management APIs.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

    Enable the APIs

  9. Make sure that you have the following role or roles on the project: Gemini Enterprise Admin

    Check for the roles

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.

    4. For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.

    Grant the roles

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. Click Grant access.
    4. In the New principals field, enter your user identifier. This is typically the email address for a Google Account.

    5. Click Select a role, then search for the role.
    6. To grant additional roles, click Add another role and add each additional role.
    7. Click Save.

创建 Gemini Enterprise 应用

  1. 在 Google Cloud 控制台中,前往 Gemini Enterprise 页面。

    Gemini Enterprise

  2. 点击创建应用

  3. 您的应用名称下方,输入应用的名称。应用 ID 显示在应用名称下方。

  4. 选择 global(全球级)作为应用的位置。

  5. 贵公司或组织的外部名称下方,输入公司或组织的名称。在本教程中,您可以使用 Cymbal Bank

  6. 点击创建

应用创建完毕后,系统会将您重定向到应用的概览页面。

创建数据存储区

  1. 完成设置下,点击创建数据存储区

  2. Cloud Storage 下,点击选择

  3. 非结构化数据导入(文档搜索和 RAG)下,确保已选择文档

  4. 同步频率下,确保已选择一次

  5. 选择您要导入的文件夹或文件下,确保已选择文件夹

  6. gs:// 字段中输入以下值:

    cloud-samples-data/gen-app-builder/search/cymbal-bank-employee
    

    此 Cloud Storage 存储桶包含虚构银行 Cymbal Bank 内部使用的 PDF 文件。

  7. 点击继续

  8. 数据存储区名称下,输入数据存储区的名称,然后点击创建

    Google Cloud 控制台会将您重定向到“关联的数据存储区”页面,其中会显示您刚刚创建的数据存储区。

预览应用

  1. 在导航菜单中,点击概览即可返回概览页面。

  2. 您的 Gemini Enterprise Web 应用已准备就绪下方,点击相应链接以访问该 Web 应用。

  3. 如需测试导入的数据,请点击连接器,并确保未选择 Google 搜索

    “连接器”按钮

  4. 在搜索栏中,针对我们导入的数据提出问题;例如,询问 How do I book business travel?

    如果此问题的答案未明确提及 Cymbal Bank,请再等几分钟,然后重试。

  5. 提出其他问题,例如:Who founded Cymbal Bank?Where are the headquarters of Cymbal Bank?

配置搜索 Web 应用

  1. 返回 Google Cloud 控制台。

  2. 在导航菜单中,点击配置

  3. 搜索界面标签页中,为搜索应用配置设置。

  4. 外观和品牌选项下,将徽标更改为 Cymbal Bank 的徽标。

    https://storage.googleapis.com/cloud-samples-data/gen-app-builder/search/cymbal-bank-logo.png
    
  5. 如果您在界面标签页中更改配置,请点击保存并发布

  6. 前往自动补全标签页,为自动补全配置特定设置。

    启用自动补全设置为立即,并预计需要等待一两天才能看到自动补全建议。

  7. 前往助理标签页,为搜索助理配置设置。

    在此页面上,您可以设置其他 LLM 系统指令,启用 Model Armor、Web 接地以及与默认助手相关的其他设置。

查看搜索 Web 应用

如需查看 Gemini Enterprise Web 应用,请执行以下操作:

  1. 在导航菜单中,点击集成

  2. 确保启用 Web 应用已启用。

  3. 指向您 Web 应用的链接部分中,点击复制,然后在浏览器中打开该链接。

  4. 可选:复制网址并将其发送给用户,以与用户共享搜索应用。用户可以将 Web 应用网址加入书签,以便日后访问。

清理

为避免因本页中使用的资源导致您的 Google Cloud 账号产生费用,请按照以下步骤操作。

  1. 若不再需要该项目,请使用Google Cloud console 将其删除,以避免产生不必要的 Google Cloud 费用。
  2. 如果您为了解 Gemini Enterprise 创建了一个新项目,但现在不再需要它,请删除项目
  3. 如果您使用的是现有 Google Cloud 项目,请删除您创建的资源,以避免您的账号产生费用。如需了解详情,请参阅删除应用删除数据存储区
  4. 按照关闭 Gemini Enterprise 中的步骤操作。

后续步骤