> This page is for version v0.25.0.
> For other versions, use one of these documentation indexes:
> - Latest (default): https://docs.nvidia.com/nemo/guardrails/latest/llms.txt
> - v0.25.0: https://docs.nvidia.com/nemo/guardrails/v0.25.0/llms.txt
> - v0.24.1: https://docs.nvidia.com/nemo/guardrails/v0.24.1/llms.txt
> - v0.24.0: https://docs.nvidia.com/nemo/guardrails/v0.24.0/llms.txt
> - v0.23.0: https://docs.nvidia.com/nemo/guardrails/v0.23.0/llms.txt
> - v0.22.0: https://docs.nvidia.com/nemo/guardrails/v0.22.0/llms.txt

> 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.

# nemoguardrails.library.self_check.output_check.actions

## Module Contents

### Functions

| Name                                                                                                 | Description                        |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------- |
| [`_self_check_outcome`](#nemoguardrails-library-self_check-output_check-actions-_self_check_outcome) | -                                  |
| [`self_check_output`](#nemoguardrails-library-self_check-output_check-actions-self_check_output)     | Checks if the output from the bot. |

### Data

[`DEFAULT_TASK`](#nemoguardrails-library-self_check-output_check-actions-DEFAULT_TASK)

[`log`](#nemoguardrails-library-self_check-output_check-actions-log)

### API

```python
nemoguardrails.library.self_check.output_check.actions._self_check_outcome(
    allowed: bool
) -> nemoguardrails.actions.rail_outcome.RailOutcome
```

```python
nemoguardrails.library.self_check.output_check.actions.self_check_output(
    llms: typing.Dict[str, nemoguardrails.types.LLMModel],
    llm_task_manager: nemoguardrails.llm.taskmanager.LLMTaskManager,
    context: typing.Optional[dict] = None,
    events: typing.Optional[typing.List[dict]] = None,
    llm: typing.Optional[nemoguardrails.types.LLMModel] = None,
    config: typing.Optional[nemoguardrails.RailsConfig] = None,
    variant: typing.Optional[str] = None,
    user_message: typing.Optional[str] = None,
    bot_message: typing.Optional[str] = None,
    bot_thinking: typing.Optional[str] = None,
    kwargs = {}
) -> nemoguardrails.actions.rail_outcome.RailOutcome
```

async

Checks if the output from the bot.

Prompt the LLM, using the `self_check_output` task prompt, to determine if the output
from the bot should be allowed or not.

The LLM call should return "yes" if the output is bad and should be blocked
(this is consistent with self_check_input_prompt).

**Returns:** [`RailOutcome`](/nemo/guardrails/v0.25.0/guardrails-python-sdk/nemoguardrails/actions/rail_outcome#nemoguardrails-actions-rail_outcome-RailOutcome)

RailOutcome.allow() if the output should be allowed, RailOutcome.block() otherwise.

```python
nemoguardrails.library.self_check.output_check.actions.DEFAULT_TASK = SELF_CHECK_OUTPUT_DEFAULT_TASK
```

```python
nemoguardrails.library.self_check.output_check.actions.log = logging.getLogger(__name__)
```