| name | aeo-entity-extractor |
| description | Extract the specific entities (brands, people, statistics, tools, URLs) that Gemini mentions in its grounded responses for a given prompt. Aggregates entity frequency across 20 runs to reveal the "entity universe" for a topic. Optionally performs entity gap analysis to show what a specific domain's content should include. Use when a user wants to: see what brands/tools Gemini recommends, find missing entities in their content, understand what statistics AI responses cite, map the competitive entity landscape, or discover which entities to include for better AI citation rates.
|
AEO Entity Extractor
Source: github.com/psyduckler/aeo-skills
Part of: AEO Skills Suite
Map the entity universe of the recurring retrieval set โ the specific brands, stats, people, and tools that Gemini weaves into its answers.
Background
When Gemini retrieves information to answer a prompt, it doesn't just cite sources โ it extracts and repeats specific entities from those sources: brand names, statistics, people, product names, and data points. These entities form the entity universe of the recurring retrieval set for that topic.
If your content doesn't include the entities Gemini expects for a topic, you're less likely to enter the candidate set. Conversely, if your content mentions the same brands, cites the same statistics, and references the same tools that Gemini consistently includes in its answers, you signal topical alignment and comprehensiveness. In Gemini's search-first architecture, the model builds its response from retrieved content โ your content needs to speak the same entity language as the rest of the candidate set.
The "long long tail" of Gemini's varied search queries means entities that appear across many different query variations are the strongest signals of topic authority. This skill identifies those high-frequency entities.
Defaults
- Model:
gemini-3-flash-preview โ the same model powering Google AI Overviews
- Samples: 20 runs per prompt โ captures the full entity universe
Requirements
- Gemini API key (free from aistudio.google.com) โ set as
GEMINI_API_KEY env var
- Python 3.9+
- No pip dependencies (stdlib only)
Usage
GEMINI_API_KEY="$GEMINI_API_KEY" python3 scripts/extract_entities.py "best project management tools for startups"
GEMINI_API_KEY="$GEMINI_API_KEY" python3 scripts/extract_entities.py "best project management tools for startups" --domain monday.com
GEMINI_API_KEY="$GEMINI_API_KEY" python3 scripts/extract_entities.py "best CRM software 2025" --output json
Run from the skill directory. Resolve scripts/extract_entities.py relative to this SKILL.md.
Options
| Option | Default | Description |
|---|
prompt | (required) | The query to analyze |
--domain | (none) | Domain for entity gap analysis (e.g., example.com) |
--runs | 20 | Number of Gemini runs |
--model | gemini-3-flash-preview | Gemini model to use |
--concurrency | 5 | Max parallel API calls (keep โค5) |
--output | text | Output format: text or json |
Output
Text Output
Entity Extractor: "best project management tools for startups"
Model: gemini-3-flash-preview
Runs: 20/20 successful
Total unique entities: 87
๐ข BRANDS & PROPER NOUNS:
============================================================
90% (18x) โโโโโโโโโโโโโโโโโโ Monday.com
85% (17x) โโโโโโโโโโโโโโโโโ Asana
70% (14x) โโโโโโโโโโโโโโ ClickUp
65% (13x) โโโโโโโโโโโโโ Trello
55% (11x) โโโโโโโโโโโ Notion
40% ( 8x) โโโโโโโโ Jira
30% ( 6x) โโโโโโ Basecamp
๐ STATISTICS & NUMBERS:
============================================================
60% (12x) โโโโโโโโโโโโ over 90% of Fortune 500 companies
45% ( 9x) โโโโโโโโโ $8/user/month
40% ( 8x) โโโโโโโโ 1.5 million teams
35% ( 7x) โโโโโโโ top 10
๐ง TOOLS & PRODUCTS:
============================================================
75% (15x) โโโโโโโโโโโโโโโ ClickUp
50% (10x) โโโโโโโโโโ HubSpot
40% ( 8x) โโโโโโโโ Slack.com
35% ( 7x) โโโโโโโ GitHub
๐ค PEOPLE:
============================================================
25% ( 5x) โโโโโ by Jason Fried
TOP SOURCE DOMAINS:
============================================================
45x โ monday.com
38x โ asana.com
...
ENTITY GAP ANALYSIS: monday.com
============================================================
Domain status: โ Cited
Your brand mentioned as:
18x โ Monday.com (brands)
High-frequency entities to include in your content:
85% โ Asana (brands)
70% โ ClickUp (brands)
60% โ over 90% of Fortune 500 companies (statistics)
55% โ Notion (brands)
โ Your content should mention these high-frequency entities...
JSON Output
Structured JSON with per-type entity rankings, source domains, and gap analysis.
Entity Types
| Type | Detection Method | Examples |
|---|
| Brands | Capitalized multi-word sequences, CamelCase | "Google Analytics", "HubSpot" |
| Statistics | Numbers with %, $, context words | "85%", "$1.2 million", "top 10" |
| People | Name patterns with attribution context | "CEO John Smith", "by Jane Doe" |
| Tools | CamelCase, .com/.io domains, suffix patterns | "ClickUp", "notion.so" |
| URLs | HTTP(S) links in response text | "https://example.com/guide" |
How It Works
- Sends the prompt to Gemini 20 times with Google Search grounding
- From each response text (not grounding metadata), extracts entities using regex patterns:
- Capitalized multi-word sequences (brand names, proper nouns)
- Numbers with percentages, currencies, and context words (statistics)
- CamelCase words and domain-like patterns (tools/products)
- Name patterns following attribution words (people)
- Full URLs mentioned in text
- Aggregates entity frequency across all runs
- Ranks entities by how often they appear (higher frequency = more consistently part of the entity universe)
- If
--domain provided: identifies high-frequency entities the domain's content should include but may not
Tips
- High-frequency entities (>50%) are part of the recurring retrieval set โ your content must mention these to be topically aligned
- Medium-frequency entities (20-50%) are commonly included โ mentioning them strengthens your coverage
- The gap analysis tells you what to add โ if competitors' brands appear but yours doesn't, you need better entity coverage
- Use entities as a content checklist โ before publishing, verify your content mentions the key brands, stats, and tools Gemini expects
- Pair with
aeo-source-authority-profiler to see both the page-level blueprint and the entity-level requirements
- Pair with
aeo-content-free to create content that includes the right entities from the start
- Run for related prompts and compare entity overlap โ shared entities reveal the core topic vocabulary
References
Notes
- Gemini API key stored in macOS Keychain under
google-api-key
- Entity extraction is regex-based (no NLP libraries) โ optimized for brands, stats, and products
- Common English words and sentence starters are filtered out to reduce noise
- Some false positives are expected โ review the entity list and focus on high-frequency items
- Retries API calls up to 5 times with exponential backoff