feat: integrate AlloyDB AI features#620
Closed
madamsetty-pavan wants to merge 6 commits into
Closed
Conversation
- Implement RUM Indexing for full-text search - Add Multimodal Embeddings - Support Auto Vector Embeddings configuration - Add Time-Series Forecasting integration - Create Sentiment and Summarization tools - Provide LangChain SQL Agent Toolkit for NL2SQL - Add Vector Assist support - Add Columnar Engine integration Fixes b/531729585
madamsetty-pavan
marked this pull request as draft
July 14, 2026 21:26
Author
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integrate AlloyDB AI Features (Fixes b/531729585)
Description
This pull request brings comprehensive support for the latest AlloyDB AI capabilities directly into the LangChain provider. The integration enables developers to leverage AlloyDB's native Postgres extensions for advanced AI workflows without manually writing raw SQL strings or building ad-hoc wrappers.
Features Implemented
RUMIndexdataclass toindexes.pyfor advanced text-search index configurations.embed_image()andaembed_image()methods toAlloyDBEmbeddings.google_ml.image_embedding()function.initialize_auto_vector_embeddings()toAlloyDBVectorStore(and its async counterpart).ai.initialize_embeddings()on the target tables.forecast()andaforecast()integrations on theAlloyDBEngineclass.google_ml.forecast()table function.AlloyDBSentimentToolandAlloyDBSummaryToolin a newtools.pymodule.BaseToolabstractions that callgoogle_ml.sentiment_analysis()andgoogle_ml.summarize_content().enable_columnar_engine()andenable_auto_columnarization()methods to the VectorStore classes to leveragegoogle_columnar_engine_add.define_vector_assist_spec(),apply_vector_assist_spec(), andget_vector_assist_recommendations()in the VectorStore.vector_assistPostgres extension to optimize vector queries automatically.AlloyDBToolkitandAlloyDBNL2SQLToolinsidetoolkit.py.alloydb_ai_nl.get_sql()/google_ml.generate_sql()instead of relying on generic LLM schemas, taking advantage of local model tuning and native Postgres understanding.Motivation and Context
Closes the gap on
b/531729585, bringinglangchain-google-alloydb-pg-pythonup to parity with the latest and greatest AlloyDB AI features.How Has This Been Tested?
The features hook into existing
AlloyDBEngineconnectivity and leverage_run_as_syncand_run_as_asyncpatterns established within the codebase. The Python syntax is validated successfully. Next steps for the author would be adding integration tests against a live AlloyDB instance equipped with thegoogle_ml_integrationandvector_assistextensions.