semantic_audience_search
Search screens by natural language scene description using pgvector.
Uses 768-dimensional Gemini embeddings on scene descriptions from FEIN edge AI to find screens matching a natural language query.
WHEN TO USE:
Finding screens by audience context ("families eating lunch in a food court")
Contextual ad placement based on real-time scene understanding
Discovering inventory matching a specific audience scenario
RETURNS: Array of matching screens ranked by semantic similarity, each with:
screen_id, mongo_screen_id, scene_description, contextual_relevance, similarity, created_at
EXAMPLE: semantic_audience_search({ query: "young professionals in a coffee shop looking at phones", limit: 10 })
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of results (default: 20, max: 100) | |
| query | Yes | Natural language description of the audience/scene to search for | |
| since | No | Time window for scene data (e.g., "1h", "24h", "7d"). Default: "24h" | |
| min_similarity | No | Minimum semantic similarity threshold 0-1 (default: 0.5) |