From 8ae7b583c82fc33684e9633afbd9fffe7129a93e Mon Sep 17 00:00:00 2001 From: Kristopher Overholt Date: Fri, 30 Aug 2024 15:01:14 -0500 Subject: [PATCH] docs: Add troubleshooting steps to Reasoning Engine + Vertex AI Search sample notebook (#1012) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Description This PR adds troubleshooting steps to the Reasoning Engine + Vertex AI Search sample notebook for failure cases that users commonly run into: * Need to create a data store **and** a search app, otherwise the LangChain retriever will throw an error if only a data store is in use. * Need to wait for the indexing to be complete, otherwise the LangChain retriever will return an empty string for any query ![Screenshot 2024-08-30 at 2 39 05 PM](https://github.com/user-attachments/assets/f3d930c7-e3c8-4c05-947f-dbe4f9473980) - [X] Follow the [`CONTRIBUTING` Guide](https://github.com/GoogleCloudPlatform/generative-ai/blob/main/CONTRIBUTING.md). - [X] You are listed as the author in your notebook or README file. - [X] Your account is listed in [`CODEOWNERS`](https://github.com/GoogleCloudPlatform/generative-ai/blob/main/.github/CODEOWNERS) for the file(s). - [X] Make your Pull Request title in the specification. - [X] Ensure the tests and linter pass (Run `nox -s format` from the repository root to format). - [X] Appropriate docs were updated (if necessary) Co-authored-by: Holt Skinner <13262395+holtskinner@users.noreply.github.com> --- .../tutorial_vertex_ai_search_rag_agent.ipynb | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/gemini/reasoning-engine/tutorial_vertex_ai_search_rag_agent.ipynb b/gemini/reasoning-engine/tutorial_vertex_ai_search_rag_agent.ipynb index 3dbf4457c82..fe55a6e47a1 100644 --- a/gemini/reasoning-engine/tutorial_vertex_ai_search_rag_agent.ipynb +++ b/gemini/reasoning-engine/tutorial_vertex_ai_search_rag_agent.ipynb @@ -324,9 +324,9 @@ "\n", "Now you'll create a data store within Vertex AI Search and index records from a movie data set.\n", "\n", - "Follow the tutorial steps in the Vertex AI Search documentation to [create a data store and search app for structured data](https://cloud.google.com/generative-ai-app-builder/docs/try-enterprise-search#structured-data). You can use a company name of **Movie Information** in your search app. You should also enable the **Enterprise edition features** and **Advanced LLM features** options so that you can use the [LangChain retriever for Vertex AI Search](https://python.langchain.com/docs/integrations/retrievers/google_vertex_ai_search/) within your agent to search indexed records.\n", + "Follow the tutorial steps in the Vertex AI Search documentation to [create a data store with structured data](https://cloud.google.com/generative-ai-app-builder/docs/try-enterprise-search#structured-data), then [create a search app](https://cloud.google.com/generative-ai-app-builder/docs/try-enterprise-search#structured-data_1) that points to that data store.\n", "\n", - "Once you've created your search app and data store, you can view the **Activity** tab within your data store's **Data** page to see the status of your data ingestion. For this dataset, the import and indexing process takes about ten minutes.\n", + "You should also enable the **Enterprise edition features** and **Advanced LLM features** options so that you can use the [LangChain retriever for Vertex AI Search](https://python.langchain.com/docs/integrations/retrievers/google_vertex_ai_search/) within your agent to search indexed records.\n", "\n", "Once the import is complete, you can navigate to your data store's **Data** page and obtain the values of your data store ID and region, which you can paste in the cell below:\n", "\n", @@ -407,6 +407,22 @@ "cell_type": "markdown", "metadata": {}, "source": [ + "
\n", + "⚠️ Important notes:
\n", + "
\n", + "If you get an empty response when running the previous cell:
\n", + "    Check the status of your data store in Vertex AI Search and try running the cell again after indexing is complete.
\n", + "    Once you've created your search app and data store, you can view the Activity tab within your data store's Data page to see the status of your data ingestion.
\n", + "    For this dataset, the import and indexing process takes about 5 to 10 minutes.
\n", + "
\n", + "If you get an error when running the previous cell:
\n", + "    In order for this sample notebook to work with the Google Vertex AI Search retriever in LangChain,
\n", + "    you'll need to create a data store and a search app associated with it in Vertex AI Search.
\n", + "    If you only create a data store, the LangChain retriever might throw errors when making queries against the data store.\n", + "
\n", + "\n", + "\n", + "\n", "### Define agent\n", "\n", "The third component of your agent involves adding a reasoning layer, which helps your agent use the tools that you provided to help the end user achieve a higher-level goal.\n",