Taxonomy Prompts

Prompts for managing topic categories, testing taxonomy rules, and onboarding new domains.

Prompts

#PromptCostDuration
1Add New Topic Category$010-15 min
2Test Taxonomy Categories$0~10-20s
3Audit Schema Coverage$01-3 min
4Activate Subcategories$05-10 min

FAQ

How many topic categories exist?

1,104 active categories across 4 depth levels:

DepthCountExamples
0 (root)33sports, science, health-medicine, space-astronomy
1 (branch)152basketball, diseases-conditions, solar-system
2 (leaf)313nba-legends-history, infectious-diseases, planets-moons
3 (detail)606all-star-records, viral-diseases, inner-rocky-planets
  • Hierarchy: each category has a parent_id and materialized path (e.g., sports/basketball/nba-legends-history/all-star-records).
  • Taxonomy configuration lives in packages/ai/src/config/taxonomy-rules-data.ts and taxonomy-voices-data.ts.
  • Seed entry definitions live in packages/ai/src/config/categories.ts (44 CategorySpec entries).

How does schema inheritance work?

  • The trigger fn_inherit_parent_schema_and_formats (migration 0135) automatically copies the parent's schema_id when a child category is inserted without an explicit schema.
  • This works at all depths: depth-1 inherits from depth-0, depth-2 from depth-1, depth-3 from depth-2.
  • Schema extensions use JSONB || concatenation to append domain-specific keys to an inherited schema. For example, formula-one inherits auto_fact (9 keys) then extends with circuit, team, etc. = 14+ keys.
  • Schema resolution: packages/ai/src/schema-utils.ts walks up the hierarchy (max 3 levels) if a category has no direct schema.

How does subcategory classification work during extraction?

  • During fact extraction, the AI prompt includes the category hierarchy via formatSubcategoryHierarchy().
  • The extraction response classifies facts to the "deepest matching level" in the hierarchy.
  • Classification is best-effort: facts that don't clearly match a specific subcategory remain assigned to the nearest matching ancestor.
  • The category's schema (including any extensions) determines which fact keys are used.

What are the 33 active root categories?

animals, architecture, art, auto, business, cooking, culture, current-events, design, entertainment, fashion, food-beverage, games, geography, geology, governments, health-medicine, history, home-living, how-things-work, language-linguistics, math, movies, music, people, places, publishing, records, science, space-astronomy, sports, technology, travel, tv, weather-climate