Taxonomy Prompts
Prompts for managing topic categories, testing taxonomy rules, and onboarding new domains.
Prompts
| # | Prompt | Cost | Duration |
|---|---|---|---|
| 1 | Add New Topic Category | $0 | 10-15 min |
| 2 | Test Taxonomy Categories | $0 | ~10-20s |
| 3 | Audit Schema Coverage | $0 | 1-3 min |
| 4 | Activate Subcategories | $0 | 5-10 min |
FAQ
How many topic categories exist?
1,104 active categories across 4 depth levels:
| Depth | Count | Examples |
|---|---|---|
| 0 (root) | 33 | sports, science, health-medicine, space-astronomy |
| 1 (branch) | 152 | basketball, diseases-conditions, solar-system |
| 2 (leaf) | 313 | nba-legends-history, infectious-diseases, planets-moons |
| 3 (detail) | 606 | all-star-records, viral-diseases, inner-rocky-planets |
- Hierarchy: each category has a
parent_idand materializedpath(e.g.,sports/basketball/nba-legends-history/all-star-records). - Taxonomy configuration lives in
packages/ai/src/config/taxonomy-rules-data.tsandtaxonomy-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'sschema_idwhen 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-oneinheritsauto_fact(9 keys) then extends withcircuit,team, etc. = 14+ keys. - Schema resolution:
packages/ai/src/schema-utils.tswalks 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