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

## Module Contents

### Functions

| Name                                                                                                                               | Description                                                                                                        |
| ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| [`autoalign_factcheck_infer`](#nemoguardrails-library-autoalign-actions-autoalign_factcheck_infer)                                 | -                                                                                                                  |
| [`autoalign_factcheck_output_api`](#nemoguardrails-library-autoalign-actions-autoalign_factcheck_output_api)                       | Calls Autoalign Factchecker API and checks if the user message is factually answered by the bot message            |
| [`autoalign_factcheck_output_api_mapping`](#nemoguardrails-library-autoalign-actions-autoalign_factcheck_output_api_mapping)       | Mapping for autoalign\_factcheck\_output\_api.                                                                     |
| [`autoalign_groundedness_infer`](#nemoguardrails-library-autoalign-actions-autoalign_groundedness_infer)                           | Checks the groundedness for the text using the given documents and provides a fact-checking score                  |
| [`autoalign_groundedness_output_api`](#nemoguardrails-library-autoalign-actions-autoalign_groundedness_output_api)                 | Calls AutoAlign groundedness check API and checks whether the bot message is factually grounded according to given |
| [`autoalign_groundedness_output_api_mapping`](#nemoguardrails-library-autoalign-actions-autoalign_groundedness_output_api_mapping) | Mapping for autoalign\_groundedness\_output\_api.                                                                  |
| [`autoalign_infer`](#nemoguardrails-library-autoalign-actions-autoalign_infer)                                                     | Checks whether the given text passes through the applied guardrails.                                               |
| [`autoalign_input_api`](#nemoguardrails-library-autoalign-actions-autoalign_input_api)                                             | Calls AutoAlign API for the user message and guardrail configuration provided                                      |
| [`autoalign_output_api`](#nemoguardrails-library-autoalign-actions-autoalign_output_api)                                           | Calls AutoAlign API for the bot message and guardrail configuration provided                                       |
| [`autoalign_output_api_mapping`](#nemoguardrails-library-autoalign-actions-autoalign_output_api_mapping)                           | Mapping for autoalign\_output\_api.                                                                                |
| [`process_autoalign_output`](#nemoguardrails-library-autoalign-actions-process_autoalign_output)                                   | Processes the output provided AutoAlign API                                                                        |

### Data

[`DEFAULT_CONFIG`](#nemoguardrails-library-autoalign-actions-DEFAULT_CONFIG)

[`GUARDRAIL_RESPONSE_TEXT`](#nemoguardrails-library-autoalign-actions-GUARDRAIL_RESPONSE_TEXT)

[`default_groundedness_config`](#nemoguardrails-library-autoalign-actions-default_groundedness_config)

[`log`](#nemoguardrails-library-autoalign-actions-log)

### API

```python
nemoguardrails.library.autoalign.actions.autoalign_factcheck_infer(
    request_url: str,
    user_message: str,
    bot_message: str,
    guardrails_config: typing.Optional[typing.Dict[str, typing.Any]] = None,
    multi_language: bool = False
)
```

async

```python
nemoguardrails.library.autoalign.actions.autoalign_factcheck_output_api(
    llm_task_manager: nemoguardrails.llm.taskmanager.LLMTaskManager,
    context: typing.Optional[dict] = None,
    factcheck_threshold: float = 0.0,
    show_autoalign_message: bool = True
)
```

async

Calls Autoalign Factchecker API and checks if the user message is factually answered by the bot message

```python
nemoguardrails.library.autoalign.actions.autoalign_factcheck_output_api_mapping(
    result: float
) -> bool
```

Mapping for autoalign\_factcheck\_output\_api.

Expects result to be a numeric score.
Returns True (block) if the score is below the default factcheck threshold.

```python
nemoguardrails.library.autoalign.actions.autoalign_groundedness_infer(
    request_url: str,
    text: str,
    documents: typing.List[str],
    guardrails_config: typing.Optional[typing.Dict[typing.Any, typing.Any]] = None
)
```

async

Checks the groundedness for the text using the given documents and provides a fact-checking score

```python
nemoguardrails.library.autoalign.actions.autoalign_groundedness_output_api(
    llm_task_manager: nemoguardrails.llm.taskmanager.LLMTaskManager,
    context: typing.Optional[dict] = None,
    factcheck_threshold: float = 0.0,
    show_autoalign_message: bool = True,
    kwargs = {}
)
```

async

Calls AutoAlign groundedness check API and checks whether the bot message is factually grounded according to given
documents

```python
nemoguardrails.library.autoalign.actions.autoalign_groundedness_output_api_mapping(
    result: float
) -> bool
```

Mapping for autoalign\_groundedness\_output\_api.

Expects result to be a numeric score.
Returns True (block) if the score is below the default groundedness threshold.

```python
nemoguardrails.library.autoalign.actions.autoalign_infer(
    request_url: str,
    text: str,
    task_config: typing.Optional[typing.Dict[typing.Any, typing.Any]] = None,
    show_toxic_phrases: bool = False,
    multi_language: bool = False
)
```

async

Checks whether the given text passes through the applied guardrails.

```python
nemoguardrails.library.autoalign.actions.autoalign_input_api(
    llm_task_manager: nemoguardrails.llm.taskmanager.LLMTaskManager,
    context: typing.Optional[dict] = None,
    show_autoalign_message: bool = True,
    show_toxic_phrases: bool = False,
    kwargs = {}
)
```

async

Calls AutoAlign API for the user message and guardrail configuration provided

```python
nemoguardrails.library.autoalign.actions.autoalign_output_api(
    llm_task_manager: nemoguardrails.llm.taskmanager.LLMTaskManager,
    context: typing.Optional[dict] = None,
    show_autoalign_message: bool = True,
    show_toxic_phrases: bool = False,
    kwargs = {}
)
```

async

Calls AutoAlign API for the bot message and guardrail configuration provided

```python
nemoguardrails.library.autoalign.actions.autoalign_output_api_mapping(
    result: dict
) -> bool
```

Mapping for autoalign\_output\_api.

Expects result to be a dict with a key "guardrails\_triggered" (a boolean).
Returns True (block) if guardrails were triggered.

```python
nemoguardrails.library.autoalign.actions.process_autoalign_output(
    responses: typing.List[typing.Any],
    show_toxic_phrases: bool = False
)
```

Processes the output provided AutoAlign API

```python
nemoguardrails.library.autoalign.actions.DEFAULT_CONFIG = {'pii': {'mode': 'OFF', 'mask': False, 'enabled_types': ['[BANK ACCOUNT NUMBER]'...
```

```python
nemoguardrails.library.autoalign.actions.GUARDRAIL_RESPONSE_TEXT = {'confidential_info_detection': 'Confidential Information violation', 'gender_bi...
```

```python
nemoguardrails.library.autoalign.actions.default_groundedness_config = {'groundedness_checker': {'verify_response': False}}
```

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