Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(table-selection): add LLM-based table selection for SQL generation #679

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

Open
WainWong wants to merge 1 commit into dataease:main
base: main
Choose a base branch
Loading
from WainWong:feature/table-selection

Conversation

@WainWong
Copy link

@WainWong WainWong commented Dec 24, 2025

Summary

  • 添加基于 LLM 的表选择功能,优先于 RAG 表嵌入方式
  • LLM 可以更准确地理解用户问题并选择相关表,特别是对于复杂的多表查询场景
  • 支持配置开关,可灵活选择使用 LLM 表选择或 RAG 表嵌入

Changes

  • backend/apps/datasource/llm_select/table_selection.py: 新增 LLM 表选择核心逻辑
  • backend/apps/template/select_table/generator.py: 表选择 prompt 生成器
  • backend/apps/datasource/crud/datasource.py: 集成 LLM 表选择到表 schema 获取流程
  • backend/apps/chat/task/llm.py: 延迟 schema 获取以支持日志记录
  • backend/common/core/config.py: 添加 LLM 表选择配置项
  • backend/alembic/versions/054_add_table_select_answer.py: 数据库迁移脚本

@WainWong WainWong force-pushed the feature/table-selection branch from 9c9fa90 to 57f3930 Compare January 8, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /