Repository navigation
refactor: enhance schema recall - #108
Conversation
- adjust workflow before plannerNode - call hybrid search in AgentVectorStoreService - add aop for log - clean unsed code
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the schema recall workflow by restructuring the query processing pipeline. The changes replace the previous two-step process (QueryRewrite + KeywordExtract) with a three-step process (IntentRecognition → EvidenceRecall → QueryEnhance) and introduce a FeasibilityAssessment node before planning.
Key changes:
- Replaced query rewrite and keyword extraction with intent recognition, evidence recall, and query enhancement nodes
- Added feasibility assessment node to validate data analysis requests before planning
- Implemented hybrid search functionality with configurable vector store properties
- Refactored schema service to use direct document lists instead of nested lists
- Added AOP-based logging for node entry points
- Removed unused code including sample data enrichment in NL2SQL service
Reviewed Changes
Copilot reviewed 61 out of 61 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| schema.sql / data.sql | Added table_name and schema_name columns to semantic_model table for better metadata tracking |
| AgentSearchRequest.java | Simplified to use Lombok builder pattern, removed complex factory methods |
| AgentVectorStoreService*.java | Refactored to support hybrid search and removed estimateDocuments method |
| SchemaService*.java | Changed column document handling from nested lists to flat lists with fusion strategy |
| Node classes | Replaced QueryRewriteNode/KeywordExtractNode with IntentRecognition/EvidenceRecall/QueryEnhance/FeasibilityAssessment nodes |
| Hybrid search classes | Updated fusion strategy to support variable arguments and parameter order |
| Configuration | Added DataAgentProperties for vector store settings and AOP logging aspect |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 80 out of 80 changed files in this pull request and generated 6 comments.
Comments suppressed due to low confidence (2)
spring-ai-alibaba-data-agent-chat/src/main/java/com/alibaba/cloud/ai/service/schema/SchemaServiceImpl.java:1
- The code adds
docstoallResultswhendocuments(the filtered result) is not empty. This appears to be a bug - it should adddocumentsinstead ofdocsto maintain consistency with the filtering logic.
spring-ai-alibaba-data-agent-chat/src/main/java/com/alibaba/cloud/ai/node/PythonExecuteNode.java:1 - Changed from
createResponsetocreatePureResponseon line 100, but line 99 usescreatePureResponsefor the start sign. This inconsistency has been corrected. Good fix.
/*
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
related to #104 |
* refactor: enhance schema recall - adjust workflow before plannerNode - call hybrid search in AgentVectorStoreService - add aop for log - clean unsed code * clean unsed node * feat: adapt flux output * add semantic support * fix: python bug * fix unit test * fix TableRelationDispatcher unit test * fix method buildBusinessKnowledgePrompt * delete unused code * add metadata constant * add semantic support * update semantic crud cotroller * fix MappersTest.java * feat: add semantic frontend * fix bugs * feat: add search text-edit * fix: bugs in schema.sql * adjust semantic and business knowledge * adjust by copilot feedback * fix MapperTest type error. * refactor: workflow * chore update README.md --------- Co-authored-by: VLSMB <2047857654@qq.com> Co-authored-by: VLSMB <36068250+VLSMB@users.noreply.github.com>
Describe what this PR does / why we need it
Does this pull request fix one issue?
close #58 close #97 close #99, fix #30 fix #104
Describe how you did it
Describe how to verify it
Special notes for reviews