SPB Git

spb/wp44_uqo

Public
6.1 KB

# Brief — Agent D (Taxonomy Architect), WP44

Goal: produce the extensible hierarchical ontology of computer-science research used to classify every work of the WP44 corpus into the 40 leaf categories of CLAUDE.md §4 (multi-label), with a deterministic mapping from the signals available in the corpus. The mapping is data, not code: it must be complete, explicit and justified so that another agent can audit it.

Inputs (read-only):

  • taxonomy/openalex_topics_2026-10-14.csv — the 4,516 OpenAlex topics (topic_id, display_name, subfield, field, domain, works_count, keywords, description). 302 topics are in field 17 (Computer Science); relevant topics also exist in Mathematics (26), Engineering (22), Decision Sciences (18), Physics (31: quantum), Biochemistry (13: bioinformatics), etc.
  • taxonomy/dblp_streams_2018_2026.csv — 3,570 DBLP venue streams (journal/conference series keys) with ≥ 100 records in 2018–2026, counts and names. journals/corr = arXiv CoRR (not a venue signal).
  • arXiv categories: cs.AI cs.AR cs.CC cs.CE cs.CG cs.CL cs.CR cs.CV cs.CY cs.DB cs.DC cs.DL cs.DM cs.DS cs.ET cs.FL cs.GL cs.GR cs.GT cs.HC cs.IR cs.IT cs.LG cs.LO cs.MA cs.MM cs.MS cs.NA cs.NE cs.NI cs.OH cs.OS cs.PF cs.PL cs.RO cs.SC cs.SD cs.SE cs.SI cs.SY, plus cross-listed stat.ML, eess.AS, eess.IV, eess.SP, eess.SY, quant-ph, math.OC, math.IT, math.ST, q-bio.QM, q-bio.GN, physics.comp-ph.

Deliverables (write these files; nothing else):

  1. taxonomy/ontology.yaml with this schema:
    yaml
    version: "1.0"
    created: "2026-11-02"
    areas:                      # 8 top-level areas (choose names; every leaf belongs to exactly one area)
      - id: ai_ml
        name: ...
        leaves: [llm, foundation_models, ...]
    categories:                 # exactly 40 leaves, ids snake_case, in the order of CLAUDE.md §4
      - id: llm
        number: 1
        name: Large Language Models
        area: ai_ml
        definition: one or two precise sentences (what is in, what is out)
        openalex_topics:        # list of {id: T10028, weight: 1.0, note: ...}; weight in (0,1]; include topics from any field
        openalex_subfields:     # list of {id: 1702, weight: 0.3} — coarse fallback only
        arxiv_categories:       # list of {id: cs.CL, weight: 0.5}
        dblp_streams:           # list of {key: conf/acl, weight: 1.0}
        keywords:               # list of {pattern: "(?i)\\blarge language model", weight: 1.0, field: title|abstract|both}
        exclusions:             # optional list of regex patterns that veto the category
        related: [foundation_models, nlp]   # ontology edges (is-related-to); also use `parent_of`/`child_of` where a leaf is a specialisation of another (e.g. llm child_of foundation_models; federated_learning child_of privacy_preserving_computation)
        provenance: short note on how the mapping was built
    assignment_rule:
      score: "sum of weights of matched signals, each signal type capped at 1.0, then sum over signal types"
      threshold: 1.0           # a work belongs to a category if score >= threshold
      primary: "argmax of score; ties broken by the more specific category (child before parent)"
  2. taxonomy/ONTOLOGY.md — human-readable description: the 8 areas, the 40 leaves with definitions, the hierarchy (parent/child edges), coverage statistics you can compute from the inputs (how many OpenAlex CS topics are mapped, unmapped CS topics listed explicitly with a reason), and the known ambiguities (e.g. LLM vs foundation model vs generative AI; cloud vs distributed vs edge; cryptography vs security vs privacy).
  3. taxonomy/topic_map.csv — one row per (openalex topic_id, category_id, weight) used in the YAML (for auditing).

Constraints:

  • Every one of the 302 OpenAlex CS topics must appear in topic_map.csv or in the "unmapped" list of ONTOLOGY.md.
  • The six AI categories that OpenAlex topics cannot separate well (LLM, foundation models, multimodal, generative AI, agents, AI safety) and the small categories (federated learning, sustainable computing, autonomous scientific discovery, privacy-preserving computation, blockchain, quantum, edge) MUST have keyword patterns (title and abstract) strong enough to reach the threshold on their own; the broad categories (CV, NLP, SE, networks, ...) can rely on topics/venues/arXiv.
  • Keyword regexes must be valid Python re patterns (double-escape backslashes in YAML strings) and should be conservative (word boundaries, avoid single ambiguous tokens such as "agent" or "model").
  • Map at least the 600 largest DBLP streams; the mapping may give a stream to several categories.
  • Do not invent topic ids: use only ids present in the CSV. Validate the YAML by loading it with Python (yaml.safe_load) and compiling every regex before you finish; report counts (topics mapped per category, keywords per category).
  • Write nothing in the manuscript. Report back a short summary (≤ 30 lines) with the counts and the open ambiguities.

# Addendum (2026-11-03, after a first attempt failed on output size)

The first attempt tried to emit ontology.yaml in one response and exceeded the 64,000-token output limit. Work incrementally and keep every single file write under ~6,000 tokens:

  • Put the mapping data in Python modules, one per area: taxonomy/src/area_ai_ml.py, taxonomy/src/area_perception.py, … each defining CATEGORIES = [ {...}, ... ] dicts with the schema of the brief (ids, weights, patterns as raw strings). Write each module with its own Write call; if an area is large, split it into two modules.
  • Write taxonomy/build_ontology.py that imports the modules, validates (40 leaves, unique ids, topic ids exist in the CSV, regexes compile, weights in (0,1]), and generates taxonomy/ontology.yaml, taxonomy/topic_map.csv and the coverage statistics section of taxonomy/ONTOLOGY.md (the prose part of ONTOLOGY.md you write by hand, briefly).
  • Run python3 taxonomy/build_ontology.py (pyyaml: /opt/homebrew/bin/python3 -m pip install --user pyyaml or use uv pip install in a venv) and fix errors until it passes. Never print whole CSVs to your context: use grep/awk/python to look up topics by keyword.
Files · ba2b7cb2d796858e41df4e8a2376a6db42e5a5df
Menu

Theme