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

literal workaround #777

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

literal workaround #777

wants to merge 7 commits into from

Conversation

ahuang11
Copy link
Contributor

@ahuang11 ahuang11 commented Nov 20, 2024

Since quotations '"table"."name"' is unconventional, the LLMs would hallucinate table names, i.e. drop quotations, and it would crash the Pydantic model, raising an invalid error. So, to workaround that, replaces everything except alphanumeric with _ which the LLM understands/copies well, then remaps it back to the original table name with all the special characters after the LLM chooses the table.

Copy link

codecov bot commented Nov 20, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 6 lines in your changes missing coverage. Please review.

Project coverage is 60.91%. Comparing base (687d54f) to head (1585bfe).

Files with missing lines Patch % Lines
lumen/ai/agents.py 0.00% 3 Missing ⚠️
lumen/ai/coordinator.py 33.33% 2 Missing ⚠️
lumen/ai/utils.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #777      +/-   ##
==========================================
- Coverage   60.92%   60.91%   -0.01%     
==========================================
  Files         103      103              
  Lines       12556    12561       +5     
==========================================
+ Hits         7650     7652       +2     
- Misses       4906     4909       +3     

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

@ahuang11 ahuang11 marked this pull request as ready for review November 20, 2024 18:54
lumen/ai/agents.py Outdated Show resolved Hide resolved
lumen/ai/agents.py Outdated Show resolved Hide resolved
lumen/ai/coordinator.py Outdated Show resolved Hide resolved
lumen/ai/agents.py Outdated Show resolved Hide resolved
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.

1 participant