# DataStoreConnectionSignals

- [JSON representation](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#SCHEMA_REPRESENTATION)
- [RewriterModelCallSignals](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#RewriterModelCallSignals)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#RewriterModelCallSignals.SCHEMA_REPRESENTATION)
- [SearchSnippet](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#SearchSnippet)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#SearchSnippet.SCHEMA_REPRESENTATION)
- [AnswerGenerationModelCallSignals](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#AnswerGenerationModelCallSignals)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#AnswerGenerationModelCallSignals.SCHEMA_REPRESENTATION)
- [AnswerPart](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#AnswerPart)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#AnswerPart.SCHEMA_REPRESENTATION)
- [CitedSnippet](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#CitedSnippet)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#CitedSnippet.SCHEMA_REPRESENTATION)
- [GroundingSignals](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#GroundingSignals)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#GroundingSignals.SCHEMA_REPRESENTATION)
- [GroundingDecision](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#GroundingDecision)
- [GroundingScoreBucket](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#GroundingScoreBucket)
- [SafetySignals](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#SafetySignals)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#SafetySignals.SCHEMA_REPRESENTATION)
- [SafetyDecision](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#SafetyDecision)
- [BannedPhraseMatch](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#BannedPhraseMatch)

Data store connection feature output signals. Might be only partially field if processing stop before the final answer. Reasons for this can be, but are not limited to: empty UCS search results, positive RAI check outcome, grounding failure, ...

| JSON representation |
|---|
| ``` { "rewriterModelCallSignals": { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#RewriterModelCallSignals`) }, "rewrittenQuery": string, "searchSnippets": [ { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#SearchSnippet`) } ], "answerGenerationModelCallSignals": { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#AnswerGenerationModelCallSignals`) }, "answer": string, "answerParts": [ { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#AnswerPart`) } ], "citedSnippets": [ { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#CitedSnippet`) } ], "groundingSignals": { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#GroundingSignals`) }, "safetySignals": { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#SafetySignals`) } } ``` |

| Fields ||
|---|---|
| `rewriterModelCallSignals` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#RewriterModelCallSignals`)`` Optional. Diagnostic info related to the rewriter model call. |
| `rewrittenQuery` | `string` Optional. Rewritten string query used for search. |
| `searchSnippets[]` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#SearchSnippet`)`` Optional. Search snippets included in the answer generation prompt. |
| `answerGenerationModelCallSignals` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#AnswerGenerationModelCallSignals`)`` Optional. Diagnostic info related to the answer generation model call. |
| `answer` | `string` Optional. The final compiled answer. |
| `answerParts[]` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#AnswerPart`)`` Optional. Answer parts with relevant citations. Concatenation of texts should add up the `answer` (not counting whitespaces). |
| `citedSnippets[]` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#CitedSnippet`)`` Optional. Snippets cited by the answer generation model from the most to least relevant. |
| `groundingSignals` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#GroundingSignals`)`` Optional. Grounding signals. |
| `safetySignals` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#SafetySignals`)`` Optional. Safety check result. |

## RewriterModelCallSignals

Diagnostic info related to the rewriter model call.

| JSON representation |
|---|
| ``` { "renderedPrompt": string, "modelOutput": string, "model": string } ``` |

| Fields ||
|---|---|
| `renderedPrompt` | `string` Prompt as sent to the model. |
| `modelOutput` | `string` Output of the generative model. |
| `model` | `string` Name of the generative model. For example, "gemini-ultra", "gemini-pro", "gemini-1.5-flash" etc. Defaults to "Other" if the model is unknown. |

## SearchSnippet

Search snippet details.

| JSON representation |
|---|
| ``` { "documentTitle": string, "documentUri": string, "text": string, "metadata": { object } } ``` |

| Fields ||
|---|---|
| `documentTitle` | `string` Title of the enclosing document. |
| `documentUri` | `string` Uri for the document. Present if specified for the document. |
| `text` | `string` Text included in the prompt. |
| `metadata` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` Metadata associated with the document. |

## AnswerGenerationModelCallSignals

Diagnostic info related to the answer generation model call.

| JSON representation |
|---|
| ``` { "renderedPrompt": string, "modelOutput": string, "model": string } ``` |

| Fields ||
|---|---|
| `renderedPrompt` | `string` Prompt as sent to the model. |
| `modelOutput` | `string` Output of the generative model. |
| `model` | `string` Name of the generative model. For example, "gemini-ultra", "gemini-pro", "gemini-1.5-flash" etc. Defaults to "Other" if the model is unknown. |

## AnswerPart

Answer part with citation.

| JSON representation |
|---|
| ``` { "text": string, "supportingIndices": [ integer ] } ``` |

| Fields ||
|---|---|
| `text` | `string` Substring of the answer. |
| `supportingIndices[]` | `integer` Citations for this answer part. Indices of `searchSnippets`. |

## CitedSnippet

Snippet cited by the answer generation model.

| JSON representation |
|---|
| ``` { "searchSnippet": { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#SearchSnippet`) }, "snippetIndex": integer } ``` |

| Fields ||
|---|---|
| `searchSnippet` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#SearchSnippet`)`` Details of the snippet. |
| `snippetIndex` | `integer` Index of the snippet in `searchSnippets` field. |

## GroundingSignals

Grounding signals.

| JSON representation |
|---|
| ``` { "decision": enum (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#GroundingDecision`), "score": enum (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#GroundingScoreBucket`) } ``` |

| Fields ||
|---|---|
| `decision` | ``enum (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#GroundingDecision`)`` Represents the decision of the grounding check. |
| `score` | ``enum (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#GroundingScoreBucket`)`` Grounding score bucket setting. |

## GroundingDecision

Represents the decision of the grounding check.

| Enums ||
|---|---|
| `GROUNDING_DECISION_UNSPECIFIED` | Decision not specified. |
| `ACCEPTED_BY_GROUNDING` | Grounding have accepted the answer. |
| `REJECTED_BY_GROUNDING` | Grounding have rejected the answer. |

## GroundingScoreBucket

Grounding score buckets.

| Enums ||
|---|---|
| `GROUNDING_SCORE_BUCKET_UNSPECIFIED` | Score not specified. |
| `VERY_LOW` | We have very low confidence that the answer is grounded. |
| `LOW` | We have low confidence that the answer is grounded. |
| `MEDIUM` | We have medium confidence that the answer is grounded. |
| `HIGH` | We have high confidence that the answer is grounded. |
| `VERY_HIGH` | We have very high confidence that the answer is grounded. |

## SafetySignals

Safety check results.

| JSON representation |
|---|
| ``` { "decision": enum (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#SafetyDecision`), "bannedPhraseMatch": enum (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#BannedPhraseMatch`), "matchedBannedPhrase": string } ``` |

| Fields ||
|---|---|
| `decision` | ``enum (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#SafetyDecision`)`` Safety decision. |
| `bannedPhraseMatch` | ``enum (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/DataStoreConnectionSignals#BannedPhraseMatch`)`` Specifies banned phrase match subject. |
| `matchedBannedPhrase` | `string` The matched banned phrase if there was a match. |

## SafetyDecision

Safety decision. All kinds of check are incorporated into this final decision, including banned phrases check.

| Enums ||
|---|---|
| `SAFETY_DECISION_UNSPECIFIED` | Decision not specified. |
| `ACCEPTED_BY_SAFETY_CHECK` | No manual or automatic safety check fired. |
| `REJECTED_BY_SAFETY_CHECK` | One ore more safety checks fired. |

## BannedPhraseMatch

Specifies banned phrase match subject.

| Enums ||
|---|---|
| `BANNED_PHRASE_MATCH_UNSPECIFIED` | No banned phrase check was executed. |
| `BANNED_PHRASE_MATCH_NONE` | All banned phrase checks led to no match. |
| `BANNED_PHRASE_MATCH_QUERY` | A banned phrase matched the query. |
| `BANNED_PHRASE_MATCH_RESPONSE` | A banned phrase matched the response. |