Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature(wren-ai-service): SQL Correction Refinement #411

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

imAsterSun
Copy link
Contributor

@imAsterSun imAsterSun commented Jun 14, 2024

Description

Currently, the invalid generation results are all processed in 1 prompt.
Now we proposed a refinement plan to separate the correction into 2 detailed steps:

  1. Error Classification
    First, we pass the sql, the summary and the error message to LLM, let it analyzes the error message, and define the following additional attributes:
    • error_type: the error type of the invalid sql, currently we want it to identify 3 types of error table not found, column not found and others
    • error_point: identify which part of the sql is incorrect, currently, it will be the wrong table name or wrong column name.
    • Then we compare the error_point to the mdl, to see if the table/column is truly not existed. Record it as the mdl_check_result
  2. SQL Correction based on the Error Type
    After we attach 3 additional attributes to the original invalid results, the correction prompts will be generated according to the error_type of each invalid sql, then pass to LLM 1 by 1

Results

[TODO]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant