docs: Possible update to injection detection - #1144
Conversation
Signed-off-by: Mike McKiernan <mmckiernan@nvidia.com>
erickgalinkin
left a comment
There was a problem hiding this comment.
Some minor notes. This is really great, Mike! Thank you!
| * `sanitize` attempts to "de-fang" the malicious content, returning the output in a way that is less likely to result exploitation. This action is generally considered unsuitable for production use. | ||
| - Code injection (Python): Recommended if the LLM output is used as an argument to downstream functions or passed to a code interpreter. | ||
| - SQL injection: Recommended if the LLM output is used as part of a SQL query to a database. | ||
| - Template injection (Jinja): Recommended for use if LLM output is rendered using templating languages like Jinja. |
There was a problem hiding this comment.
| - Template injection (Jinja): Recommended for use if LLM output is rendered using templating languages like Jinja. | |
| - Template injection (Jinja): Recommended for use if LLM output is rendered using templating languages. Currently, only Jinja is supported. |
The syntax used is specific to Jinja, so even if you're using something Jinja-like, it won't work.
There was a problem hiding this comment.
Thanks for the clarification about "Jinja-like" not working. I'm not a fan of "currently" because, depending on priorities, it might read "currently" for three or four years. How about...
- Template injection (Jinja): Recommended for use if LLM output is rendered using the Jinja templating language.
This rule is usually paired with code injection rules.
When we add more languages, we'll just have to update this section--and would have to even if "currently" was in the text.
Signed-off-by: Mike McKiernan <mmckiernan@nvidia.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1144 +/- ##
==========================================
Coverage ? 68.65%
==========================================
Files ? 161
Lines ? 15978
Branches ? 0
==========================================
Hits ? 10969
Misses ? 5009
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Mike McKiernan <mmckiernan@nvidia.com>
|
@mikemckiernan thank you for the changes 👍🏻 We had update to injection detection and added |
Signed-off-by: Mike McKiernan <mmckiernan@nvidia.com>
Pouyanpi
left a comment
There was a problem hiding this comment.
Thank you @mikemckiernan for making the changes 👍🏻
Description
Possible update to injection detection.
Review HTML:
https://nvidia.github.io/NeMo-Guardrails/review/pr-1144/user-guides/guardrails-library.html#injection-detection
Related Issue(s)
Checklist