> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/guardrails/llms.txt.
> For full documentation content, see https://docs.nvidia.com/nemo/guardrails/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/guardrails/_mcp/server.

# nemoguardrails.actions.output_mapping

## Module Contents

### Functions

| Name                                                                                      | Description                                                               |
| ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| [`default_output_mapping`](#nemoguardrails-actions-output_mapping-default_output_mapping) | A fallback output mapping if an action does not provide one.              |
| [`is_output_blocked`](#nemoguardrails-actions-output_mapping-is_output_blocked)           | Determines if an action result is not allowed using its attached mapping. |

### API

```python
nemoguardrails.actions.output_mapping.default_output_mapping(
    result: typing.Any
) -> bool
```

A fallback output mapping if an action does not provide one.

* For a boolean result: assume True means allowed (so block if False).
* For a numeric result: use 0.5 as a threshold (block if the value is less).
* Otherwise, assume the result is allowed.

```python
nemoguardrails.actions.output_mapping.is_output_blocked(
    result: typing.Any,
    action_func: typing.Any
) -> bool
```

Determines if an action result is not allowed using its attached mapping.

**Parameters:**

The value returned by the action.

The action function (whose metadata contains the mapping).

**Returns:** `bool`

True if the mapping indicates that the output should be blocked, False otherwise.