Skip to content

[Bug]: Can't Create RAG Config because of wrong vertex_ai_search_config format #2428

@obumnwabude

Description

@obumnwabude

File Name

gemini/rag-engine/rag_engine_vertex_ai_search.ipynb

What happened?

When you get to the Create RAG Config session/title, after inputting a Display Name and Engine Name, the cell fails to run saying that serving_config must be of a peculiar format.

Image

On fixing with Gemini, got a different error of region issues, but should use a different GCP Project in a different region to solve that

Image Image

Relevant log output

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
/tmp/ipython-input-3598091713.py in <cell line: 0>()
     10 )
     11 
---> 12 rag_corpus = rag.create_corpus(
     13     display_name=DISPLAY_NAME,
     14     vertex_ai_search_config=vertex_ai_search_config,

1 frames~/.local/lib/python3.12/site-packages/vertexai/preview/rag/rag_data.py in create_corpus(display_name, description, corpus_type_config, embedding_model_config, vector_db, vertex_ai_search_config, backend_config, encryption_spec, timeout)
    169 
    170     if vertex_ai_search_config:
--> 171         _gapic_utils.set_vertex_ai_search_config(
    172             vertex_ai_search_config=vertex_ai_search_config,
    173             rag_corpus=rag_corpus,

~/.local/lib/python3.12/site-packages/vertexai/preview/rag/utils/_gapic_utils.py in set_vertex_ai_search_config(vertex_ai_search_config, rag_corpus)
    930         )
    931     else:
--> 932         raise ValueError(
    933             "serving_config must be of the format `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}` or `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}`"
    934         )

ValueError: serving_config must be of the format `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}` or `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}`

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions