fix(schema): 使用 query 进行表向量召回 #480
Open
ZhangDT-sky wants to merge 2 commits intospring-ai-alibaba:mainfrom
Open
fix(schema): 使用 query 进行表向量召回 #480ZhangDT-sky wants to merge 2 commits intospring-ai-alibaba:mainfrom
ZhangDT-sky wants to merge 2 commits intospring-ai-alibaba:mainfrom
Conversation
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.
Describe what this PR does / why we need it
修复表 Schema 召回时未实际使用用户
query的问题。此前虽然构建了包含
query的SearchRequest,但实际执行的是仅按 metadata 过滤的查询路径,导致会召回当前数据源下的全部表,而不是与用户问题相关的表。Does this pull request fix one issue?
Yes. Closes #478
Describe how you did it
SchemaServiceImpl#getTableDocumentsByDatasource(...)的调用逻辑,使表召回实际执行带query的向量相似度检索。AgentVectorStoreService#similaritySearch(SearchRequest)接口。AgentVectorStoreServiceImpl中补充对应实现。SchemaServiceImplTest,验证表召回会正确使用用户query。Describe how to verify it
运行以下命令: