> 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.library.self_check.facts.actions

## Module Contents

### Functions

| Name                                                                                                    | Description                                                                    |
| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| [`mapping_self_check_facts`](#nemoguardrails-library-self_check-facts-actions-mapping_self_check_facts) | Mapping for self\_check\_facts.                                                |
| [`self_check_facts`](#nemoguardrails-library-self_check-facts-actions-self_check_facts)                 | Checks the facts for the bot response by appropriately prompting the base llm. |

### Data

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

### API

```python
nemoguardrails.library.self_check.facts.actions.mapping_self_check_facts(
    result: float
) -> bool
```

Mapping for self\_check\_facts.

Expects result to be a numeric score (float) representing the factual accuracy.
Returns True (i.e. block the output) if the score is below 0.5.

```python
nemoguardrails.library.self_check.facts.actions.self_check_facts(
    llm_task_manager: nemoguardrails.llm.taskmanager.LLMTaskManager,
    context: typing.Optional[dict] = None,
    llm: typing.Optional[nemoguardrails.types.LLMModel] = None,
    config: typing.Optional[nemoguardrails.RailsConfig] = None,
    kwargs = {}
)
```

async

Checks the facts for the bot response by appropriately prompting the base llm.

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