Built-in Actions Reference
Built-in Actions Reference
This section describes the default actions included in the NeMo Guardrails library.
Core Actions
These actions are fundamental to the guardrails process:
generate_user_intent
Converts raw user input into a canonical intent form:
generate_next_steps
Determines what the bot should do next:
generate_bot_message
Generates the actual bot response text:
retrieve_relevant_chunks
Retrieves context from the knowledge base:
Guardrail-Specific Actions
These actions implement built-in guardrails:
self_check_input
Validates user input against configured policies:
self_check_output
Validates bot output against configured policies:
self_check_facts
Verifies facts against retrieved knowledge base chunks:
self_check_hallucination
Detects hallucinated content in bot responses:
LangChain Tool Wrappers
The library includes wrappers for popular LangChain tools.
These tool wrappers are only available when the NEMO_GUARDRAILS_DEMO_ACTIONS environment variable is set.
Using LangChain Tools
Wikipedia Example
Sensitive Data Detection Actions
detect_sensitive_data
mask_sensitive_data
Content Safety Actions
LlamaGuard Example
Jailbreak Detection Actions
Using Built-in Actions in Custom Flows
You can combine built-in actions with custom logic:
Related Topics
- Action Parameters - Special parameters provided automatically
- Registering Actions - Different ways to register actions
- Creating Custom Actions - Create your own actions