

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 使用查詢和回應測試您的知識庫
<a name="knowledge-base-test"></a>

設定知識庫之後，您可以透過下列方式測試其行為：
+ 使用 [https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html) 操作，從您的資料來源傳送查詢和擷取相關資訊。
+ 使用 [https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html) 操作，根據從資料來源擷取的資訊傳送查詢並產生對查詢的回應。
+ 使用 [https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html) 或 [https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html) 時，使用重新排名模型而非預設的 Amazon Bedrock 知識庫重新排名模型來擷取更相關的來源。
+ 搭配 `Retrieve` 或 `RetrieveAndGenerate` API 使用選用的中繼資料篩選條件，以指定可在資料來源中使用哪些文件。

當您對知識庫的行為感到滿意時，您可以設定應用程式來查詢知識庫，或繼續前往 [部署 AI 應用程式的知識庫](knowledge-base-deploy.md) 將知識庫連接至代理程式。

選取主題以進一步了解。

**Topics**
+ [查詢知識庫並擷取資料](kb-test-retrieve.md)
+ [查詢知識庫並根據擷取的資料產生回應](kb-test-retrieve-generate.md)
+ [產生結構化資料的查詢](knowledge-base-generate-query.md)
+ [查詢連線至 Amazon Kendra GenAI 指數的知識庫](kb-test-kendra.md)
+ [查詢連線至 Amazon Neptune Analytics 圖形的知識庫](kb-test-neptune.md)
+ [設定和自訂查詢和回應產生](kb-test-config.md)
+ [使用知識庫設定推理模型的回應產生](kb-test-configure-reasoning.md)