跳转到主要内容

热门内容

今日:


总体:


最近浏览:


Chinese, Simplified

category

本文中描述的一些功能可能仅在预览版中可用。此预览版没有服务级别协议,我们不建议将其用于生产工作负载。某些功能可能不受支持或功能受限。有关详细信息,请参阅Microsoft Azure预览版的补充使用条款。

在本文中,您将学习如何创建和使用向量索引来执行检索增强生成(RAG)。

先决条件

您必须具备:

  • Azure人工智能工作室项目
  • Azure AI搜索资源

从“索引”选项卡创建索引

  • 登录Azure AI Studio。
  • 转到您的项目或在Azure AI Studio中创建新项目。
  • 从左侧的可折叠菜单中,选择“组件”下的“索引”。

Screenshot of Project Left Menu.

  • Select + New index

  • Choose your Source data. You can choose source data from a list of your recent data sources, a storage URL on the cloud, or upload files and folders from the local machine. You can also add a connection to another data source such as Azure Blob Storage.

  • Screenshot of select source data.

  • 选择源数据后选择下一步
  • 选择索引存储-您希望存储索引的位置
  • 如果您已经为Azure AI搜索服务创建了连接,则可以从下拉列表中选择。
  1. Screenshot of select index store.

    1. If you don't have an existing connection, choose Connect other Azure AI Search service
    2. Select the subscription and the service you wish to use.

    Screenshot of Select index store details.

  2. Select Next after choosing index storage

  3. Configure your Search Settings

    1. The Vector settings defaults to true for Add vector search to this search resource. As noted, this enables Hybrid and Hybrid + Semantic search options. Disabling this limits vector search options to Keyword and Semantic.
    2. For the hybrid option to work, you need an embedding model. Choose an embedding model from the dropdown.
    3. Select the acknowledgment to deploy an embedding model if it doesn't already exist in your resource

    Screenshot of configure search settings.

    If a non-Azure OpenAI model isn't appearing in the dropdown follow these steps:

    1. Navigate to the Project settings in Azure AI Studio.
    2. Navigate to connections section in the settings tab and select New connection.
    3. Select Serverless Model.
    4. Type in the name of your embedding model deployment and select Add connection. If the model doesn't appear in the dropdown, select the Enter manually option.
    5. Enter the deployment API endpoint, model name, and API key in the corresponding fields. Then add connection.
    6. The embedding model should now appear in the dropdown.

    Screenshot of connect a serverless model.

  4. Select Next after configuring search settings

  5. In the Index settings

    1. Enter a name for your index or use the autopopulated name
    2. Schedule updates. You can choose to update the index hourly or daily.
    3. Choose the compute where you want to run the jobs to create the index. You can
      • Auto select to allow Azure AI to choose an appropriate VM size that is available
      • Choose a VM size from a list of recommended options
      • Choose a VM size from a list of all possible options

    Screenshot of configure index settings.

  6. Select Next after configuring index settings

  7. Review the details you entered and select Create

  8. You're taken to the index details page where you can see the status of your index creation.

Create an index from the Playground

  1. Open your AI Studio project.

  2. Navigate to the Playground tab.

  3. The Select available project index is displayed for existing indexes in the project. If an existing index isn't being used, continue to the next steps.

  4. Select the Add your data dropdown.

    Screenshot of the playground add your data dropdown.

  5. If a new index is being created, select the Add your data option. Then follow the steps from Create an index from the Indexes tab to navigate through the wizard to create an index.

    1. If there's an external index that is being used, select the Connect external index option.

    2. In the Index Source

      1. Select your data source
      2. Select your AI Search Service
      3. Select the index to be used.

      Screenshot of the page where you select an index.

    3. Select Next after configuring search settings.

    4. In the Index settings

      1. Enter a name for your index or use the autopopulated name
      2. Schedule updates. You can choose to update the index hourly or daily.
      3. Choose the compute where you want to run the jobs to create the index. You can
        • Auto select to allow Azure AI to choose an appropriate VM size that is available
        • Choose a VM size from a list of recommended options
        • Choose a VM size from a list of all possible options
    5. Review the details you entered and select Create.

    6. The index is now ready to be used in the Playground.

Use an index in prompt flow

  1. Sign in to Azure AI Studio and select your project.

  2. From the collapsible left menu, select Prompt flow.

  3. Open an existing prompt flow or select + Create to create a new flow.

  4. On the top menu of the flow designer, select More tools, and then select Index Lookup.

    Screenshot of Vector index Lookup from More Tools.

  5. Provide a name for your Index Lookup Tool and select Add.

  6. Select the mlindex_content value box, and select your index. After completing this step, enter the queries and query_types to be performed against the index.

    Screenshot of the prompt flow node to configure index lookup.

本文地址
最后修改
星期六, 十月 5, 2024 - 15:52
Article