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

# nemo_curator.stages.text.experimental.translation.utils.prompt_loader

Shared prompt-loading helpers for translation stages.

## Module Contents

### Functions

| Name                                                                                                                  | Description                                                          |
| --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| [`load_prompt_template`](#nemo_curator-stages-text-experimental-translation-utils-prompt_loader-load_prompt_template) | Load a YAML prompt file and return `(system_prompt, user_template)`. |

### Data

[`_PROMPT_DIR`](#nemo_curator-stages-text-experimental-translation-utils-prompt_loader-_PROMPT_DIR)

### API

```python
nemo_curator.stages.text.experimental.translation.utils.prompt_loader.load_prompt_template(
    filename: str
) -> tuple[str, str]
```

Load a YAML prompt file and return `(system_prompt, user_template)`.

## Parameters

filename : str
Name of the YAML file inside the `prompts/` directory
(e.g. `"translate.yaml"` or `"faith_eval.yaml"`).

## Returns

tuple\[str, str]
`(system prompt, user template)`.

## Raises

FileNotFoundError
If the prompt file does not exist.
ValueError
If the YAML is malformed or does not contain a top-level mapping.
KeyError
If the top-level mapping is missing the `system` or `user` key.

```python
nemo_curator.stages.text.experimental.translation.utils.prompt_loader._PROMPT_DIR = Path(__file__).resolve().parent.parent / 'prompts'
```