Skip to content

Commit

Permalink
Add Feature Store, Vector Search, Pinecone Vector DB option for corpu…
Browse files Browse the repository at this point in the history
…s creation to rag notebook

PiperOrigin-RevId: 675703407
  • Loading branch information
speedstorm1 authored and copybara-github committed Sep 17, 2024
1 parent 55ed17d commit eeb49b6
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion notebooks/community/model_garden/model_garden_rag.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"source": [
"## Model Garden RAG API\n",
"\n",
"Last updated: 9/11/2024\n",
"Last updated: 9/17/2024\n",
"\n",
"## Onboarding\n",
"If you have any questions, please reach out to *Vertex RAG API * team [email protected], for the onboarding process.\n",
Expand Down Expand Up @@ -181,6 +181,31 @@
" api_key=API_KEY,\n",
")\n",
"\n",
"# Configure a Vertex Feature Store Database Instance for the corpus\n",
"RESOURCE_NAME = \"feature-view-resource-name\" # @param {type:\"string\"}\n",
"\n",
"vector_db = rag.VertexFeatureStore(\n",
" resource_name=RESOURCE_NAME,\n",
")\n",
"\n",
"# Configure a Pinecone Vector Database Instance for the corpus\n",
"INDEX_NAME = \"pinecone-index-name\" # @param {type:\"string\"}\n",
"API_KEY = \"your-secret-manager-resource-name\" # @param {type:\"string\"}\n",
"\n",
"vector_db = rag.Pinecone(\n",
" index_name=INDEX_NAME,\n",
" api_key=API_KEY,\n",
")\n",
"\n",
"# Configure a Vertex Vector Search Database Instance for the corpus\n",
"INDEX_ENDPOINT = \"vector-search-index-endpoint\" # @param {type:\"string\"}\n",
"INDEX = \"vector-search-index-resource-name\" # @param {type:\"string\"}\n",
"\n",
"vector_db = rag.VertexVectorSearch(\n",
" index_endpoint=INDEX_ENDPOINT,\n",
" index=INDEX,\n",
")\n",
"\n",
"\n",
"# Name your corpus\n",
"DISPLAY_NAME = \"your-corpus-name\" # @param {type:\"string\"}\n",
Expand Down

0 comments on commit eeb49b6

Please sign in to comment.