debezium/dbz#2074 feat: add core retrieval layer and LangGraph node s…#9
Open
KMohnishM wants to merge 1 commit into
Open
debezium/dbz#2074 feat: add core retrieval layer and LangGraph node s…#9KMohnishM wants to merge 1 commit into
KMohnishM wants to merge 1 commit into
Conversation
8ed2d1c to
9c7c425
Compare
bb30493 to
805e8ff
Compare
…upport Signed-off-by: KMohnishM <kmohnishm@gmail.com>
9c7c425 to
0fbfe10
Compare
805e8ff to
d13e308
Compare
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.
…upport
Description
This Pull Request implements the core retrieval integration layer for PyDebeziumAI (Week 4, PR 1).
With the core ingestion, transformation, and sync managers in place, this PR provides the consuming interface to expose the live-updating vector stores directly to LangChain QA chains and LangGraph agents.
Resolves: debezium/dbz#2074
Key Changes
Retrieval Package (
pydebeziumai.retrieval):create_retriever_tool: Wraps aVectorStoreAdapterinto a LangChain Tool. Automatically uses LangChain's nativecreate_retriever_toolif thelangchainpackage is installed, and seamlessly falls back to a customBaseToolimplementation if onlylangchain-coreis available.create_retriever_node: Generates a LangGraph-compatible state graph node. Supports extracting query strings fromstate["query"],state["messages"](auto-extracting the last message's content), Pydantic object attributes, or via a custom user-defined extractor callback.Unit Test Suite (
tests/unit/test_retrieval.py):create_retriever_nodequery extraction patterns across dictionaries, message lists, object states, and custom extractor callables.ValueErrorwhen non-string queries are extracted).Verification Results
All quality, formatting, and typing checks have been executed successfully inside WSL:
All checks passed!)Success: no issues found in 21 source files)