-
Notifications
You must be signed in to change notification settings - Fork 10
Labels
Area/AIIssues related to general AI features, except AI ArtifactsIssues related to general AI features, except AI ArtifactsArea/DataMapperArtifacts: Datamapper and inline data mapperArtifacts: Datamapper and inline data mapperType/Bug
Description
Description:
The current repairing workflow in the AI Data Mapper is incomplete and can result in invalid mappings. The main issue is that the workflow runs diagnostics on the entire project directory and sends all code to the LLM for repair, which may introduce hallucinations or unnecessary errors.
Current Workflow (Old Approach):
- Generate mappings and update the source code in a temporary directory.
- Run project diagnostics.
- Apply programmatic fixes such as
addMissingImports,removeUnusedImports,addMissingRequiredFields. Run diagnostics again. - Send all diagnostics from the entire directory and code to the LLM for repair. After repair, handle check expression errors programmatically. Then, check project diagnostics again and remove error field mappings or assign default values.
Problem:
- Running
checkProjectDiagnosticsfor the entire directory is unnecessary. - Sending the whole directory to the LLM may introduce hallucinated errors or unintended changes.
Proposed Improved Workflow (New Repair Workflow):
- Generate mappings and update the source code in a temporary directory.
- Get the
DM modelfor the new mapping function and extract diagnostics for each mapping. Send only these diagnostics along with theDM modelto the LLM for repair. - This ensures the LLM has all the necessary context without extra code that may cause hallucinations.
- After repair, check diagnostics for the mapping.
- If there are errors, remove the faulty mappings, repair them, and ensure the final code is compilable.
Metadata
Metadata
Assignees
Labels
Area/AIIssues related to general AI features, except AI ArtifactsIssues related to general AI features, except AI ArtifactsArea/DataMapperArtifacts: Datamapper and inline data mapperArtifacts: Datamapper and inline data mapperType/Bug