ai-lc4j-demos/demo-08/README.md

15 lines
770 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Demo 08 - Guardrails
===============================================
We will explore how to mitigate prompt injection using input guardrails, that are a set of functions executed before
and after the LLMs response to ensure the safety and reliability of the interaction.
# Prompt injection
Prompt injection is a security risk that arises when malicious input is crafted to manipulate the behavior of an LLM.
LLMs are particularly susceptible to these attacks because they are trained to follow natural language instructions,
which can be exploited to alter their intended logic.
To mitigate prompt injection, developers should implement validation mechanisms, such as input sanitization
and strict control over which functions the model is allowed to call.