langchain-ai / langchain-google

MIT License
73 stars 78 forks source link

[bugifx] Vertex AI Search - Blended Search - breaking without support for some search params (temporary) #156

Open zeroasterisk opened 2 months ago

zeroasterisk commented 2 months ago

For a period of time, Vertex AI Search engine_data_type=3 (Blended search) doesn't support some search params which are defaulted to on.

    status = StatusCode.INVALID_ARGUMENT
details = "Setting query_expansion_spec, spell_correction_spec, content_search_spec proto fields is not allowed for multi-datastore search."

FR 1: Ability to explicitly remove the search settings. (perhaps value = -1 means don't pass in the param)

FR 2: Default to remove for now. While we are waiting on those features to be available, let's just get the default settings to work, and we can improve the defaults in the future.

lkuligin commented 2 months ago

thanks for bring this to our attention! would you like to contribute / work on this one?

zeroasterisk commented 2 months ago

I was about to start making edits and I realized that the copy in this repo is divergent from the copy in the main langchain repo

https://github.com/langchain-ai/langchain/blob/9efab3ed662fd789d2fc4f50c07ca6cb6d20a078/libs/community/langchain_community/retrievers/google_vertex_ai_search.py#L46

do you recommend a sync and then edit here, or do you recommend an edit there and then sync here?

lkuligin commented 2 months ago

here is the latest version, this integration on langchain_community is already marked as deprecated. https://github.com/langchain-ai/langchain/blob/9efab3ed662fd789d2fc4f50c07ca6cb6d20a078/libs/community/langchain_community/retrievers/google_vertex_ai_search.py#L199