---
title: Transcript.Instructions
framework: foundationmodels
role: symbol
role_heading: Structure
path: foundationmodels/transcript/instructions
---

# Transcript.Instructions

Instructions you provide to the model that define its behavior.

## Declaration

```swift
struct Instructions
```

## Overview

Overview Instructions are typically provided to define the role and behavior of the model. Apple trains the model 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:segments:toolDefinitions:)](foundationmodels/transcript/instructions/init(id:segments:tooldefinitions:).md)

### Inspecting instructions

- [segments](foundationmodels/transcript/instructions/segments.md)
- [toolDefinitions](foundationmodels/transcript/instructions/tooldefinitions.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Identifiable](swift/identifiable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Constructing content

- [Transcript.TextSegment](foundationmodels/transcript/textsegment.md)
- [Transcript.StructuredSegment](foundationmodels/transcript/structuredsegment.md)
- [Transcript.ResponseFormat](foundationmodels/transcript/responseformat.md)
- [Transcript.ToolDefinition](foundationmodels/transcript/tooldefinition.md)
- [Transcript.AttachmentSegment](foundationmodels/transcript/attachmentsegment.md)
- [Transcript.ImageAttachment](foundationmodels/transcript/imageattachment.md)
- [Transcript.Prompt](foundationmodels/transcript/prompt.md)
- [Transcript.Reasoning](foundationmodels/transcript/reasoning.md)
- [Transcript.Response](foundationmodels/transcript/response.md)
- [Transcript.ToolCall](foundationmodels/transcript/toolcall.md)
- [Transcript.ToolCalls](foundationmodels/transcript/toolcalls.md)
- [Transcript.ToolOutput](foundationmodels/transcript/tooloutput.md)
- [Transcript.CustomSegment](foundationmodels/transcript/customsegment.md)
