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
{w=486px align=center
279
277
280
278
Let's examine the same process for the follow-up question "What is the capital of France?".
281
279
@@ -321,9 +319,7 @@ Summary: 3 LLM call(s) took 1.79 seconds and used 1374 tokens.
321
319
322
320
Based on these steps, we can see that the `ask general question` canonical form is predicted for the user utterance "What is the capital of France?". Since there is no flow that matches it, the LLM is asked to predict the next step, which in this case is `bot response for general question`. Also, since there is no predefined response, the LLM is asked a third time to predict the final message.
{w=686px align=center}
{w=815px align=center}
289
287
290
288
The `self check input` rail calls the `self_check_input` action, which in turn calls the LLM using the `self_check_input` task prompt.
{w=740px align=center}
Copy file name to clipboardExpand all lines: docs/user-guides/guardrails-process.md
+4-13
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,7 @@ This guide provides an overview of the main types of rails supported in NeMo Gua
6
6
7
7
NeMo Guardrails has support for five main categories of rails: input, dialog, output, retrieval, and execution. The diagram below provides an overview of the high-level flow through these categories of flows.
{w=75% align=center}
12
10
13
11
## Categories of Rails
14
12
@@ -28,24 +26,19 @@ There are five types of rails supported in NeMo Guardrails:
28
26
29
27
The diagram below depicts the guardrails process in detail:
{w="75%" align=center}
34
30
35
31
The guardrails process has multiple stages that a user message goes through:
36
32
37
33
1.**Input Validation stage**: The user input is first processed by the input rails. The input rails decide if the input is allowed, whether it should be altered or rejected.
38
34
2.**Dialog stage**: If the input is allowed and the configuration contains dialog rails (i.e., at least one user message is defined), then the user message is processed by the dialog flows. This will ultimately result in a bot message.
39
35
3.**Output Validation stage**: After a bot message is generated by the dialog rails, it is processed by the output rails. The Output rails decide if the output is allowed, whether it should be altered, or rejected.
40
36
41
-
42
37
## The Dialog Rails Flow
43
38
44
39
The diagram below depicts the dialog rails flow in detail:
{w=500px align=center}
49
42
50
43
The dialog rails flow has multiple stages that a user message goes through:
51
44
@@ -59,6 +52,4 @@ The dialog rails flow has multiple stages that a user message goes through:
59
52
60
53
When the `single_llm_call.enabled` is set to `True`, the dialog rails flow will be simplified to a single LLM call that predicts all the steps at once. The diagram below depicts the simplified dialog rails flow:
{w=500px align=center}
0 commit comments