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

Sample row in table info for SQLDatabase (#769) #782

Merged
merged 2 commits into from
Jan 28, 2023

Conversation

hwchase17
Copy link
Contributor

The agents usually benefit from understanding what the data looks like to be able to filter effectively. Sending just one row in the table info allows the agent to understand the data before querying and get better results.


Co-authored-by: Francisco Ingham <>

fpingham and others added 2 commits January 28, 2023 08:32
The agents usually benefit from understanding what the data looks like
to be able to filter effectively. Sending just one row in the table info
allows the agent to understand the data before querying and get better
results.

---------

Co-authored-by: Francisco Ingham <>
@hwchase17 hwchase17 merged commit 248c297 into master Jan 28, 2023
@hwchase17 hwchase17 deleted the harrison/sample-row-sql branch January 28, 2023 21:37
hwchase17 pushed a commit that referenced this pull request Feb 7, 2023
#782 added the ability to include a sample row of a table to the prompt
to provide more context for the model. As demonstrated in [this
paper](https://arxiv.org/abs/2204.00498), performance increases with the
number of rows provided, up to 3 in their tests. This PR builds on #782
to allow for selecting the number of rows to include.

Also, a few of the outputs in the sqlite example notebook were incorrect
for the chinook db - there are 8 entries in the employee table, not 9.
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.

2 participants