Does anyone know what is roughly the database size limit for SQL agent? #3730
-
I'm just curious would SQLDatabaseChain still work if I have a really large database? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Generally speaking, yes. The If you're using the SQL Database Agent (rather than the chain), be aware that it will start with listing all the tables in the db. This can also potentially cause problems if the number of tables is too large and exceeds the prompt token limit. Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
I have a table with 45 rows, 46 column each and run into the limit already. Here's the error I got:
|
Beta Was this translation helpful? Give feedback.
Generally speaking, yes. The
SQLDatabaseChain
will still work if you have a really large database.SQLDatabaseChain
doesn't load the entire database into memory. Instead, it formulates a SQL query based on your input and then runs it against the database. The only time you may run into issues is if the SQL query result is too long and exceeds the prompt token limit for your chosen LLM. For example, davinci has a limit of about 4,000 tokens.If you're using the SQL Database Agent (rather than the chain), be aware that it will start with listing all the tables in the db. This can also potentially cause problems if the number of tables is too large and exceeds the prompt token limit.
Hope th…