<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FoundationModels",
  "identifier" : "/documentation/FoundationModels/Transcript/Instructions",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation Models",
      "FoundationModels"
    ],
    "preciseIdentifier" : "s:16FoundationModels10TranscriptV12InstructionsV"
  },
  "title" : "Transcript.Instructions"
}
-->

# Transcript.Instructions

Instructions you provide to the model that define its behavior.

```
struct Instructions
```

## Overview

Instructions are typically provided to define the role and behavior of the model. The model is
typically trained to obey instructions over any commands it receives in prompts. This is a
security mechanism to help mitigate prompt injection attacks.

## Topics

### Creating instructions

[`init(id: String, segments: [Transcript.Segment], toolDefinitions: [Transcript.ToolDefinition])`](/documentation/FoundationModels/Transcript/Instructions/init(id:segments:toolDefinitions:))

Creates instructions that describe how you want the model to behave, in natural language.

### Inspecting instructions

[`var segments: [Transcript.Segment]`](/documentation/FoundationModels/Transcript/Instructions/segments)

The content of the instructions, in natural language.

[`var toolDefinitions: [Transcript.ToolDefinition]`](/documentation/FoundationModels/Transcript/Instructions/toolDefinitions)

A list of tools made available to the model.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Identifiable`](/documentation/Swift/Identifiable)

[`Sendable`](/documentation/Swift/Sendable)

[`Escapable`](/documentation/Swift/Escapable)

[`Equatable`](/documentation/Swift/Equatable)

[`Copyable`](/documentation/Swift/Copyable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)