分享方式:


使用 QnA Maker 入口網站新增問題和答案

注意

Azure OpenAI On Your Data 會利用大型語言模型 (LLM) 來產生與 QnA Maker 類似的結果。 如果您想要將 QnA Maker 專案移轉至 Azure OpenAI On Your Data,請參閱我們的指南 (部分機器翻譯)。

建立知識庫之後,請使用中繼資料新增成對的問與答 (QnA),以篩選出答案。 下表中的問題與 Azure 服務限制有關,但每個問題都與不同的 Azure 搜尋服務有關。

注意

QnA Maker 服務即將於 2025 年 3 月 31 日淘汰。 較新版的問題和解答功能現在隨附於 Azure AI 語言。 如需瞭解語言服務內的問題解答功能,請參閱問題解答。 從 2022 年 10 月 1 日開始,您將無法建立新的 QnA Maker 資源。 如需將現有 QnA Maker 知識庫移轉至問題解答的相關資訊,請參閱移轉指南

配對 問題 回答 中繼資料
#1 How large a knowledge base can I create?

What is the max size of a knowledge base?

How many GB of data can a knowledge base hold?
The size of the knowledge base depends on the SKU of Azure search you choose when creating the QnA Maker service. Read [here](../concepts/azure-resources.md) for more details. service=qna_maker
link_in_answer=true
#2 How many knowledge bases can I have for my QnA Maker service?

I selected an Azure Cognitive Search tier that holds 15 knowledge bases, but I can only create 14 - what is going on?

What is the connection between the number of knowledge bases in my QnA Maker service and the Azure Cognitive Search service size?
Each knowledge base uses 1 index, and all the knowledge bases share a test index. You can have N-1 knowledge bases where N is the number of indexes your Azure Cognitive Search tier supports. service=search
link_in_answer=false

將中繼資料新增至 QnA 配對之後,用戶端應用程式可以:

  • 要求僅符合特定中繼資料的答案。
  • 接收所有答案,但根據每個答案的中繼資料來對答案進行後置處理。

必要條件

登入 QnA Maker 入口網站

  1. 登入 QnA Maker 入口網站

  2. 選取來自先前快速入門的現有知識庫。

新增其他採用不同說法的問題

目前的知識庫具有 QnA Maker 疑難排解 QnA 配對。 在建立程序期間,將 URL 新增至知識庫時,便已建立了這些成對的問與答。

匯入此 URL 時,只會建立一個有單一答案的問題。 在此程序中,請新增其他問題。

  1. 在 [編輯] 頁面上,使用成對問與答上方的搜尋文字方塊,尋找問題 How large a knowledge base can I create?

  2. 在 [問題] 資料行中,選取 [+ 新增不同說法],然後新增下表所提供的每個新說法。

    不同說法
    What is the max size of a knowledge base?
    How many GB of data can a knowledge base hold?
  3. 選取 儲存並訓練 來重新訓練知識庫。

  4. 選取 [測試],然後輸入接近其中一個新的不同說法,但用語不是完全相同的問題:

    What GB size can a knowledge base be?

    正確答案會以 Markdown 格式傳回:

    The size of the knowledge base depends on the SKU of Azure search you choose when creating the QnA Maker service. Read [here](../concepts/azure-resources.md) for more details.

    如果您在傳回的答案下選取 [檢查],則可以看到更多符合問題,但信賴度不同的答案。

    請勿新增每個可能的不同說法組合。 當您開啟 QnA Maker 的主動式學習時,這會尋找最能讓知識庫符合使用者需求的不同說法。

  5. 再次選取 [測試] 來關閉測試視窗。

新增中繼資料以篩選答案

將中繼資料新增至成對的問與答,可讓用戶端應用程式要求經過篩選的答案。 系統會先套用此篩選條件,再套用第一個和第二個順位排定程式

  1. 此快速入門的第一個表格中,新增第二個成對的問與答,但不包含中繼資料,然後繼續進行下列步驟。

  2. 選取 [檢視選項],然後選取 [顯示中繼資料]

  3. 針對您剛才新增的 QnA 配對,選取 [新增中繼資料標籤],然後新增 service 的名稱和 search 的值。 其看起來像這樣:service:search

  4. 使用 link_in_answer 的名稱和 false 的值新增其他中繼資料標籤。 其看起來像這樣:link_in_answer:false

  5. 在資料表中搜尋第一個答案:How large a knowledge base can I create?

  6. 為相同的兩個中繼資料標籤新增中繼資料組合:

    link_in_answer : true
    service: qna_maker

    現在,您有兩個具有相同中繼資料標籤,但值不同的問題。

  7. 選取 儲存並訓練 來重新訓練知識庫。

  8. 選取頂端功能表中的 [發佈],以移至 [發佈] 頁面。

  9. 選取 [發佈] 按鈕,將目前的知識庫發佈至端點。

  10. 知識庫發佈完成後,請繼續進行下一個快速入門,以了解如何從知識庫產生答案。

您完成了哪些工作?

您已編輯知識庫以支援更多問題,並提供名稱/值組以支援在搜尋期間於一或多個答案傳回後,篩選出最佳答案或進行後續處理。

清除資源

如果您不想繼續進行下一個快速入門,請刪除 Azure 入口網站中的 QnA Maker 和 Bot Framework 資源。

下一步