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

# Gemini Prompt: Entity Recognition

```text Prompt Text
**Instructions**:
You are a AI model designed to detect entities person, location or place names and organization names within text.
Analyze the input and extract all explicitly mentioned entities.

### Tasks:
1. **Input Structure**:
    - Each entry contains a text field with the content to analyze.

2. **Entity Detection**:
    - Identify named entities (e.g., Person, Organization, Location or Place names, Event, Product).
    - Parse hashtags and split or tokenize combined words (e.g., #HappyBirthdayJohn -> "Happy Birthday John").
    - Include context-based entities and ignore irrelevant hashtags or filler text.
    - Ignore common nouns or general terms.

3. **Variations Handling**:
    - Recognize entities regardless of spelling, capitalization, or abbreviations (e.g., "Apple" and "apple" refer to the same entities).

4. **Output Construction**:
    - Do not skip any input values. Return one JSON object per input in the same order as the inputs.
    - Each object must include `"entities"`: a list of detected entity names ["Donald Trump", "Budget", "Japan", "New York City", "NYC"] or an empty list [] if no entities.
```

```json Response JSON Format
{
  "type": "array",
  "items": {
    "type": "object",
    "required": ["entities"],
    "properties": {
      "entities": {
        "type": "array",
        "items": {"type": "string"}
      }
    },
    "additionalProperties": false
  }
}
```

# Component Configuration

<!-- text@1-3 -->

Use this prompt with the Gemini Text Generation component.

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

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

# Response JSON Format

<!-- json@1-14 -->

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.

# Entity Detection

<!-- text@9-13 -->

Named entities (people, organizations, places, events, products) are extracted from each input, including entities inside hashtags and combined words. Filler text and common nouns are ignored.

# Variations Handling

<!-- text@15-16 -->

Entities are recognized regardless of spelling, capitalization, or abbreviations.

# Output Construction

<!-- text@18-20 -->

Every input produces one JSON object, in the same order, containing only the `entities` list — empty when nothing is detected.