Skip to content

The sql generated by llm does not follow the referenced database #1170

@mywnlb

Description

@mywnlb

首先感谢为text2sql领域做出的项目尝试

问题:
1 在测试中发现生成的部分sql在调用wren_ibis时发生适配问题,导致后续工作无法进行,排查发现在调用llm时生成的sql.py中的提示词未指定适配的数据库,直接使用了 ANSI SQL,导致生成sql不适配。

2 wren_ibis中对sql进行重写时也未适配数据库和版本

3 chart.py中直接调用llm生成chart json,但是部分模型对提示词中的json解析不够完善,导致无法返回正确的chart json,能否修改为首先获取对应的图形,然后获取对应x轴y轴和其他json所需的字段定义,最后替换对应的chart的json

4 相关问题消耗大量的token能否添加配置取消

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions