<!--
{
  "availability" : [
    "iOS: 27.3.0 -",
    "iPadOS: 27.3.0 -",
    "macOS: 27.3.0 -",
    "visionOS: 27.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SiriEvaluations",
  "identifier" : "/documentation/SiriEvaluations/SiriResponse",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Siri Evaluations"
    ],
    "preciseIdentifier" : "s:15SiriEvaluations0A8ResponseV"
  },
  "title" : "SiriResponse"
}
-->

# SiriResponse

An expectation that the reply Siri gives contains specific text.

```
struct SiriResponse
```

## Overview

Use `SiriResponse` to check the text of the reply Siri gives for a turn. Every
check must hold, and each check passes when the reply contains the text you give.
The text is plain text, not a pattern. A check is case-sensitive unless you pass
`false` for `caseSensitive`. In the Xcode evaluation report, a check that fails
shows the reply Siri gives next to the text it requires.

The wording Siri uses varies between runs even when Siri responds correctly, so
name something the reply has to say, such as a topic or a name the person provides,
not how Siri says it. To check a value that an intent receives or returns, use
[`Calls`](/documentation/SiriEvaluations/Calls) instead. Use `SiriResponse` for details that appear only in the reply.

Check a reply on the turn that gives it. A turn accepts a `SiriResponse`, but
the expectation closure of [`init(_:expectation:)`](/documentation/SiriEvaluations/SiriScenario/init(_:expectation:)) doesn’t, because
the reply belongs to a single turn.

The following example shows a turn that expects the reply to name the topic in
any capitalization:

```swift
UserTurn("In QuizExample, start a science quiz with 5 questions") {
    SiriResponse(.contains("science", caseSensitive: false))
}
```

## Topics

### Creating a response expectation

[`init(SiriResponse.Text...)`](/documentation/SiriEvaluations/SiriResponse/init(_:))

Creates an expectation that Siri’s reply satisfies every check.

### Matching response text

[`struct Text`](/documentation/SiriEvaluations/SiriResponse/Text)

One check on the reply’s text.

## Relationships

### Conforms To

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

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

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

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

---

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)