WEBVTT

00:01.200 --> 00:02.400
Hello everyone!

00:02.960 --> 00:07.160
In today's video we will learn about Nemo Guardrails runtime.

00:07.640 --> 00:15.440
The guardrails runtime uses an event driven design that is an event loop that processes events and generates

00:15.440 --> 00:16.840
back other events.

00:17.320 --> 00:24.760
Whenever the user says something to the bot, an utterance user action finished event is created and

00:24.760 --> 00:26.240
sent to the runtime.

00:27.120 --> 00:29.680
The process has three main stages.

00:29.880 --> 00:32.280
Generate canonical user message.

00:32.600 --> 00:39.280
Then it decides the next steps and executes them and then generate bot utterances.

00:39.640 --> 00:45.680
Each of the above stage can involve one or more calls to the line on the right side.

00:45.680 --> 00:47.640
Here is a Nemo guardrails.

00:47.640 --> 00:49.240
Runtime workflow.

00:49.720 --> 00:56.000
Guardrails can be ran as a library from the server or as a standalone application.

00:56.360 --> 01:02.240
Once the framework is bootstrapped, it embeds the canonical form and user utterances.

01:03.000 --> 01:09.890
Once the user generates the input, it matches the canonical form using vector Are libraries such as

01:09.930 --> 01:17.290
annoy or fees, which are in memory libraries for running the vector searches.

01:17.730 --> 01:23.490
It then either matches the current flow here or generates its own flow using the LHS.

01:24.290 --> 01:31.770
Once the flow is matched or generated using the inputs or given it invokes another user defined, it

01:31.810 --> 01:33.650
invokes the execute flow.

01:34.210 --> 01:39.610
This execute flow is part of the guardrails flow that are already defined.

01:39.930 --> 01:43.290
If there is one it uses from the predefined flows.

01:44.090 --> 01:45.810
If not, it creates one.

01:45.810 --> 01:47.890
Using the call.

01:48.370 --> 01:55.850
It then invokes any user defined actions that are specified in the flow, and then it matches the canonical

01:55.850 --> 01:56.850
form output.

01:57.170 --> 01:59.290
If there is one, it uses it.

01:59.570 --> 02:03.730
If not, it creates one using the call.

02:04.490 --> 02:10.690
Once the output message has been created, it returns the response back to the user.

02:11.090 --> 02:14.890
This is the overall runtime engine for the guardrails.

02:15.170 --> 02:17.650
Let's understand this with an example.
