-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Feature Store, Vector Search, Pinecone Vector DB option for corpu…
…s creation to rag notebook PiperOrigin-RevId: 675703407
- Loading branch information
1 parent
55ed17d
commit eeb49b6
Showing
1 changed file
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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", | ||
|
@@ -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", | ||
|