Module prompt_ir

View as Markdown

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

Prompt Intermediate Representation (IR) types for the Adaptive Cache Governor (ACG) system.

The Prompt IR decomposes LLM conversations into addressable blocks with structural metadata for cache analysis and prompt rewriting. This is deliberately different from the message-oriented AnnotatedLlmRequest in core - the IR flattens the hierarchy into a sequence of blocks, each carrying provenance, sensitivity, and stability metadata.

Structs

  • PromptBlock: A single addressable block within the Prompt IR.
  • PromptIR: Prompt Intermediate Representation - the full decomposed prompt.
  • SpanId: Stable span identifier for addressable prompt blocks.
  • TokenizationMetadata: Token count metadata for a prompt block.
  • ToolSchemaHash: Hash fingerprint of a tool schema definition.

Enums