Skip to content

Commit

Permalink
docs: Add troubleshooting steps to Reasoning Engine + Vertex AI Searc…
Browse files Browse the repository at this point in the history
…h sample notebook (GoogleCloudPlatform#1012)

# 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
<https://www.conventionalcommits.org/> 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>
  • Loading branch information
koverholt and holtskinner authored Aug 30, 2024
1 parent b724be2 commit 8ae7b58
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions gemini/reasoning-engine/tutorial_vertex_ai_search_rag_agent.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -407,6 +407,22 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-warning\">\n",
"<b>⚠️ Important notes:</b><br>\n",
"<br>\n",
"<b>If you get an empty response when running the previous cell:</b><br>\n",
"&nbsp;&nbsp;&nbsp;&nbsp;Check the status of your data store in Vertex AI Search and try running the cell again after indexing is complete.<br>\n",
"&nbsp;&nbsp;&nbsp;&nbsp;Once you've created your search app and data store, you can view the <b>Activity</b> tab within your data store's <b>Data</b> page to see the status of your data ingestion.<br>\n",
"&nbsp;&nbsp;&nbsp;&nbsp;For this dataset, the import and indexing process takes about 5 to 10 minutes.<br>\n",
"<br>\n",
"<b>If you get an error when running the previous cell:</b><br>\n",
"&nbsp;&nbsp;&nbsp;&nbsp;In order for this sample notebook to work with the Google Vertex AI Search retriever in LangChain,<br>\n",
"&nbsp;&nbsp;&nbsp;&nbsp;you'll need to create a data store <b>and</b> a search app associated with it in Vertex AI Search.<br>\n",
"&nbsp;&nbsp;&nbsp;&nbsp;If you only create a data store, the LangChain retriever might throw errors when making queries against the data store.\n",
"</div>\n",
"\n",
"</div>\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",
Expand Down

0 comments on commit 8ae7b58

Please sign in to comment.