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

[Bug]: CSV QA in text2sql can not parse the right result #4279

Closed
1 task done
TeslaZY opened this issue Dec 28, 2024 · 0 comments
Closed
1 task done

[Bug]: CSV QA in text2sql can not parse the right result #4279

TeslaZY opened this issue Dec 28, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@TeslaZY
Copy link
Contributor

TeslaZY commented Dec 28, 2024

Is there an existing issue for the same bug?

  • I have checked the existing issues.

RAGFlow workspace code commit ID

8cdf101

RAGFlow image version

v0.15.1-20-g7773afa5 full

Other environment information

Apple M4 Max 128GB
macOS 15.2
Launch service from source

Actual behavior

QA knowledge, the csv file is uploaded for parsing. The QA content of text2sql is question and sql. In sql, there is often text similar to "select a, b, c", and the usual csv is separated by commas. The current ragflow will cause the parsing result to not meet the expectations because of "select a, b, c", because the parsing code completely uses ',' as the separator, and does not recognize the closed character "" on the periphery of sql.

Expected behavior

No response

Steps to reproduce

1. Upload the QA.csv file of text2sql to a QA knowledge

2. Turn on the parsing task

3. Check the results

Additional information

QA.csv

@TeslaZY TeslaZY added the bug Something isn't working label Dec 28, 2024
KevinHuSh pushed a commit that referenced this issue Dec 30, 2024
Fix some bugs in text2sql.(#4279)(#4281)

### What problem does this PR solve?
- The incorrect results in parsing CSV files of the QA knowledge base in
the text2sql scenario. Process CSV files using the csv library. Decouple
CSV parsing from TXT parsing
- Most llm return results in markdown format ```sql query ```, Fix
execution error caused by LLM output SQLmarkdown format.### Type of
change
- [x] Bug Fix (non-breaking change which fixes an issue)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants