Hello everyone!
In today's video we will learn about Nemo Guardrails runtime.
The guardrails runtime uses an event driven design that is an event loop that processes events and generates
back other events.
Whenever the user says something to the bot, an utterance user action finished event is created and
sent to the runtime.
The process has three main stages.
Generate canonical user message.
Then it decides the next steps and executes them and then generate bot utterances.
Each of the above stage can involve one or more calls to the line on the right side.
Here is a Nemo guardrails.
Runtime workflow.
Guardrails can be ran as a library from the server or as a standalone application.
Once the framework is bootstrapped, it embeds the canonical form and user utterances.
Once the user generates the input, it matches the canonical form using vector Are libraries such as
annoy or fees, which are in memory libraries for running the vector searches.
It then either matches the current flow here or generates its own flow using the LHS.
Once the flow is matched or generated using the inputs or given it invokes another user defined, it
invokes the execute flow.
This execute flow is part of the guardrails flow that are already defined.
If there is one it uses from the predefined flows.
If not, it creates one.
Using the call.
It then invokes any user defined actions that are specified in the flow, and then it matches the canonical
form output.
If there is one, it uses it.
If not, it creates one using the call.
Once the output message has been created, it returns the response back to the user.
This is the overall runtime engine for the guardrails.
Let's understand this with an example.