Skip to content
Discussion options

You must be logged in to vote

The most reliable way to do this is to create a database user that only has access to those specific tables/schemas.

The other mechanism would be to override the run sql tool to reject queries against tables that aren't in an allowed list.

Beyond those 2, any other mechanism is simply a "suggestion" to the LLM and the user can maliciously prompt engineer their way to querying unapproved tables.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@uyaman-dev
Comment options

Answer selected by zainhoda
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants