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

Add sql context #890

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Add sql context #890

wants to merge 4 commits into from

Conversation

ahuang11
Copy link
Contributor

@ahuang11 ahuang11 commented Dec 21, 2024

Closes #889

Motivated by if user changes the spec a lot, (or even a little, change max to min) the table name may not be relevant, so the LLM should be able to look at the SQL for the source of truth.

Fixes a bug where create_sql_expr_source doesn't set ephemeral=True.

Also, provides additional SQL context for ephemeral tables in Planner. The planner can additionally look at the non-eph tables' schemas if requested

Lastly, it uses consistent formatting across templates

@ahuang11 ahuang11 requested a review from philippjfr December 21, 2024 02:59
Copy link

codecov bot commented Dec 21, 2024

Codecov Report

Attention: Patch coverage is 0% with 13 lines in your changes missing coverage. Please review.

Project coverage is 51.66%. Comparing base (3b580de) to head (71e9391).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
lumen/ai/utils.py 0.00% 6 Missing ⚠️
lumen/ai/coordinator.py 0.00% 5 Missing ⚠️
lumen/ai/models.py 0.00% 1 Missing ⚠️
lumen/sources/duckdb.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #890   +/-   ##
=======================================
  Coverage   51.66%   51.66%           
=======================================
  Files         108      108           
  Lines       13697    13700    +3     
=======================================
+ Hits         7076     7078    +2     
- Misses       6621     6622    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

Provide more schema context so Planner can plan better
1 participant