5 ms·
From the prompt context: DO NOT make any DML statements (INSERT, UPDATE, DELETE, DROP etc.) to the database. I've found that spelling out exactly what I don't
by panarky 3y ago
From the prompt context:
DO NOT make any DML statements (INSERT, UPDATE, DELETE, DROP etc.) to the database.
I've found that spelling out exactly what I don't want an LLM to do dramatically increases the probability that it will do exactly that.
- p1necone 3y agoYeah, I hope this is paired with something that actually stops those statements from running otherwise this is a pretty naive way to do this.
- DaiPlusPlus 3y agoSQL injection meets prompt-injection…
- calcsam 3y agoCouldn’t you solve this simply by executing from a user without these permissions?
- newaccount74 3y agoSure, but it's something that the customer has to do. I wouldn't rely on customers to configure everything correctly, especially if there is no way to discover the configuration error before the damage has been done.
- panarky 3y agoNEVER CREATE CARTESIAN PRODUCTS For example: SELECT clicks.session_id, clicks.page_url, sessions.user_id FROM clicks, sessions; (This context is guaranteed to generate lots of cartesian products.)
- ainesh93 3y agoYes, opening the connection to the DB read-only would also work. That's what we're planning on doing.
- YeGoblynQueenne 3y ago"Don't think of a pink elephant".