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

# Struct PromptIR

> Prompt Intermediate Representation - the full decomposed prompt.

Generated from `cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi`.

<pre />

Prompt Intermediate Representation - the full decomposed prompt.

A `PromptIR` is produced by the IR construction phase (Phase 6) from an `AnnotatedLlmRequest`. It flattens the message hierarchy into an ordered sequence of [`PromptBlock`](/reference/api/rust-library-reference/nemo-relay-adaptive/acg/prompt_ir/struct-promptblock)s, each carrying structural metadata for cache analysis and rewriting.

## Fields

### `ir_id: Uuid`

Unique identifier for this IR instance.

### `blocks: Vec<PromptBlock>`

Ordered sequence of prompt blocks.

### `tool_schema_hashes: Option<Vec<ToolSchemaHash>>`

Hashes of tool schemas active at IR creation time.

### `structured_output_schema_id: Option<String>`

Identifier of the structured output schema, if any.

### `source_request_hash: Option<String>`

Optional hash of the source `AnnotatedLlmRequest` for traceability.

### `created_at: DateTime<Utc>`

When this IR was created.

## Trait Implementations

### `impl Clone for PromptIR`

<pre />

#### `clone`

<pre />

#### `clone_from`

<pre />

### `impl Debug for PromptIR`

<pre />

#### `fmt`

<pre />

### `impl<'de> Deserialize<'de> for PromptIR`

<pre />

#### `deserialize`

<pre />

### `impl PartialEq for PromptIR`

<pre />

#### `eq`

<pre />

#### `ne`

<pre />

### `impl Serialize for PromptIR`

<pre />

#### `serialize`

<pre />

### `impl StructuralPartialEq for PromptIR`

<pre />