---
updatedAt: 2026-08-24T18:17:32.000Z
agentTools:
  projectIndex: https://docs.datastreamer.io/llms.txt
---

# Gemini Prompt: Intent

```text Prompt Text
**Instructions**: You are an advanced AI model trained in intent classification. Your task is to analyze text inputs and identify purchase or commercial intent in a structured JSON format.
1. Analyze the text and assign "yes" when it expresses purchase or commercial intent, or "no" when it does not.
2. Provide a confidence score (0.0 to 1.0).
3. Return None if the analysis fails.
4. Do not include the original text in the output.

**Output Format**:
- Return one JSON object per input in the same order as the inputs.
- Each object must contain `"label"` and `"confidence"`.
```

```json Response JSON Format
{
  "type": "array",
  "items": {
    "type": "object",
    "required": ["label", "confidence"],
    "properties": {
      "label": {
        "type": "string",
        "enum": ["yes", "no"]
      },
      "confidence": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      }
    },
    "additionalProperties": false
  }
}
```

# Component Configuration

<!-- text@1 -->

Use this prompt with the Gemini Text Generation component.

- Source Path: `content.body`
- Destination Path: `enrichment.intent`
- Suggested Model: `gemini-3.1-flash-lite`

Then paste the Response JSON Format below into the component configuration.

# Response JSON Format

<!-- json@1-19 -->

Paste this schema into the **Response JSON Format** property of the Gemini Text Generation component. Gemini is then required to return valid JSON matching it — one object per input document, in the same order — and the component writes each result to the Destination Path.

# Intent Classification Instructions

<!-- text@2-5 -->

Each input is labeled "yes" or "no" for purchase or commercial intent, with a confidence score. The model returns null if the analysis fails and never echoes the original text.

# Output Format

<!-- text@7-9 -->

One JSON object per input, in the same order, containing only the `label` and `confidence` fields.