You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/documentation/features/ai-guardrails.mdx
+43-16Lines changed: 43 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,41 +9,68 @@ Both tools make it possible to program guardrails that safeguard conversations w
9
9
10
10
Key benefits of adding programmable guardrails include:
11
11
12
-
**Trustworthiness and Reliability:* Guardrails can be used to guide and safeguard conversations between your users and your LLM system. You can choose to define the behavior of your LLM system on specific topics and prevent it from engaging in discussions on unwanted topics.
12
+
**Trustworthiness and Reliability:*
13
13
14
-
**Controllable Dialog:* Use guardrails to steer the LLM to follow pre-defined conversational flows, making sure the LLM follows best practices in conversation design and enforces standard procedures, such as authentication.
14
+
Guardrails can be used to guide and safeguard conversations between your users and your LLM system. You can choose to define the behavior of your LLM system on specific topics and prevent it from engaging in discussions on unwanted topics.
15
15
16
-
**Protection against Vulnerabilities:* Guardrails can be specified in a way that they can help increase the security of your LLM application by checking for LLM vulnerabilities, such as checking for secrets in user inputs or LLM responses or detecting prompt injections.
16
+
**Controllable Dialog:*
17
+
18
+
Use guardrails to steer the LLM to follow pre-defined conversational flows, making sure the LLM follows best practices in conversation design and enforces standard procedures, such as authentication.
19
+
20
+
**Protection against Vulnerabilities:*
21
+
22
+
Guardrails can be specified in a way that they can help increase the security of your LLM application by checking for LLM vulnerabilities, such as checking for secrets in user inputs or LLM responses or detecting prompt injections.
17
23
18
24
## Types of Guardrails
19
25
20
26
In the following, we give a brief overview of the types of guardrails that can be specified with the open-source toolkits [NeMo Guardrails](https://github.com/NVIDIA/NeMo-Guardrails) and [Guardrails AI](https://github.com/guardrails-ai/guardrails). For further technical documentation, please check out the respective GitHub repositories and documentations.
NeMo Guardrails supports five main types of guardrails (short: rails):
39
+
28
40
<Framecaption="Type of AI Guardrails with NeMo Guardrails">
29
-

41
+

30
42
</Frame>
31
-
**Input Rails:* Checking the user input, an input rail can reject, change (e.g., to rephrase or mask sensitive data), or stop processing the input.
32
43
33
-
**Dialog Rails:* Dialog rails influence how the LLM is prompted and determine if an action should be executed, if the LLM should be invoked to generate the next step or a response, if a predefined response should be used instead, etc.
44
+
**Input Rails:*
45
+
46
+
Checking the user input, an input rail can reject, change (e.g., to rephrase or mask sensitive data), or stop processing the input.
47
+
48
+
**Dialog Rails:*
34
49
35
-
**Retrieval Rails:* When using a RAG (Retrieval Augmented Generation) LLM system, retrieval rails check the retrieved documents and can reject, change (e.g., to rephrase or mask sensitive data), or stop processing specific chunks.
50
+
Dialog rails influence how the LLM is prompted and determine if an action should be executed, if the LLM should be invoked to generate the next step or a response, if a predefined response should be used instead, etc.
36
51
37
-
**Execution Rails:* Execution rails use mechanisms to check and verify the inputs and/or outputs of custom actions that are being evoked by the LLM (e.g., the LLM triggering actions in other tools).
52
+
**Retrieval Rails:*
38
53
39
-
**Output Rails:* Checking the response of a LLM, an output rail can reject, change (e.g., remove sensitive data), or remove a LLM’s response.
54
+
When using a RAG (Retrieval Augmented Generation) LLM system, retrieval rails check the retrieved documents and can reject, change (e.g., to rephrase or mask sensitive data), or stop processing specific chunks.
55
+
56
+
**Execution Rails:*
57
+
58
+
Execution rails use mechanisms to check and verify the inputs and/or outputs of custom actions that are being evoked by the LLM (e.g., the LLM triggering actions in other tools).
59
+
60
+
**Output Rails:*
61
+
62
+
Checking the response of a LLM, an output rail can reject, change (e.g., remove sensitive data), or remove a LLM’s response.
Guardrails AI offers Guardrails Hub, a collection of pre-built checks for specific types of LLM risks (called “validators”). Multiple validators can be combined together into Guardrail AI’s Input and Output Guards (guardrail object) that intercept the inputs and outputs of LLMs. Visit [Guardrails Hub](https://hub.guardrailsai.com/) to see the full list of validators and their documentation.
47
-
<Framecaption="Examples of AI Guardrails with Guardrails AI (Guardrails AI, 2024)">
48
-

49
-
</Frame>
75
+
76
+
")
0 commit comments