-
Notifications
You must be signed in to change notification settings - Fork 225
Description
list_tables
uses a meta query (copied from postgres-meta) which is very verbose. Users have reported this very quickly filling the context window (plus exceeding 1MB request payload limit on dashboard assistant) after just one tool call.
Though supastructure will likely be the long term solution, we should improve this tool in the mean time. There is quite a bit of duplicate information that the LLM probably doesn't need, particularly in the column, relationship, and primary key fields (e.g. these fields repeat the source table name & ID when we already know this from object hierarchy). There might be other meta information that is mostly irrelevant to LLMs that we can also trim out.
This task is to trim down this query to only include relevant & deduplicated information for the LLM. The added bonus of this is that we will likely see some significant cost savings from trimming down this context.