surfaceclassificationvibes
Classificationdimension · returns varchar

VIBES

Extract vibe categories from a text collection and assign each text to one

Per-row classifier — stable across GROUP BY.

classificationhybridspecialist-zooscales-largetext

Syntax

VIBES({{ text }})
VIBES({{ text }}, {{ num_vibes }})
VIBES({{ text }}, {{ num_vibes }}, '{{ focus }}')
{{ text }} VIBES {{ num_vibes }}
{{ text }} VIBES INTO {{ num_vibes }}

Arguments

nametypedescription
textVARCHAR
num_vibesINTEGER
focusVARCHAR

About

Semantic vibe dimension — extracts N vibe categories from a collection of texts, then assigns each text to its dominant vibe. Backend: hybrid specialist-zoo clustering + compact LLM naming. 1. Embed all texts with bge-m3 on the GPU and run k-means with k=num_vibes (via specialist_cluster → /cluster route). This step is O(N) on the GPU, not on the LLM — safely handles 100K+ rows without context-window pressure. 2. Ask a fast LLM to name each of the K clusters using only its representative value. Prompt size is O(K), independent of N. 3. Map each text to its cluster's assigned vibe name. Vibes are inherently creative labels ("main character energy", "cozy autumn vibes", "that 3am energy") so the naming step stays LLM- backed — the specialist zoo can cluster on meaning but cannot invent evocative category names. Cost is O(K) LLM calls regardless of N. This is a DIMENSION-shaped function for use in GROUP BY clauses. For fully LLM-backed naming AND assignment (useful when you need the LLM to also judge which text best fits which vibe), use VIBES_LLM — see vibes_llm.cascade.yaml.

Examples

Vibe extracted

SELECT
  vibes ('This is giving main character energy')

Nearby rabbit holes

same domain
Climb back to The Looking Glass