SPB Git

spb/wp44_uqo

Public
6.1 KB · 78 lines markdown
1# Brief — Agent D (Taxonomy Architect), WP4423Goal: produce the extensible hierarchical ontology of computer-science research used to classify every work of the WP444corpus into the 40 leaf categories of CLAUDE.md §4 (multi-label), with a deterministic mapping from the signals available5in the corpus. The mapping is *data*, not code: it must be complete, explicit and justified so that another agent can audit it.67Inputs (read-only):8- `taxonomy/openalex_topics_2026-10-14.csv` — the 4,516 OpenAlex topics (topic_id, display_name, subfield, field, domain,9  works_count, keywords, description). 302 topics are in field 17 (Computer Science); relevant topics also exist in10  Mathematics (26), Engineering (22), Decision Sciences (18), Physics (31: quantum), Biochemistry (13: bioinformatics), etc.11- `taxonomy/dblp_streams_2018_2026.csv` — 3,570 DBLP venue streams (journal/conference series keys) with ≥ 100 records12  in 2018–2026, counts and names. `journals/corr` = arXiv CoRR (not a venue signal).13- 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.GL14  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.SD15  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,16  q-bio.QM, q-bio.GN, physics.comp-ph.1718Deliverables (write these files; nothing else):191. `taxonomy/ontology.yaml` with this schema:20   ```yaml21   version: "1.0"22   created: "2026-11-02"23   areas:                      # 8 top-level areas (choose names; every leaf belongs to exactly one area)24     - id: ai_ml25       name: ...26       leaves: [llm, foundation_models, ...]27   categories:                 # exactly 40 leaves, ids snake_case, in the order of CLAUDE.md §428     - id: llm29       number: 130       name: Large Language Models31       area: ai_ml32       definition: one or two precise sentences (what is in, what is out)33       openalex_topics:        # list of {id: T10028, weight: 1.0, note: ...}; weight in (0,1]; include topics from any field34       openalex_subfields:     # list of {id: 1702, weight: 0.3} — coarse fallback only35       arxiv_categories:       # list of {id: cs.CL, weight: 0.5}36       dblp_streams:           # list of {key: conf/acl, weight: 1.0}37       keywords:               # list of {pattern: "(?i)\\blarge language model", weight: 1.0, field: title|abstract|both}38       exclusions:             # optional list of regex patterns that veto the category39       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)40       provenance: short note on how the mapping was built41   assignment_rule:42     score: "sum of weights of matched signals, each signal type capped at 1.0, then sum over signal types"43     threshold: 1.0           # a work belongs to a category if score >= threshold44     primary: "argmax of score; ties broken by the more specific category (child before parent)"45   ```462. `taxonomy/ONTOLOGY.md` — human-readable description: the 8 areas, the 40 leaves with definitions, the hierarchy47   (parent/child edges), coverage statistics you can compute from the inputs (how many OpenAlex CS topics are mapped,48   unmapped CS topics listed explicitly with a reason), and the known ambiguities (e.g. LLM vs foundation model vs49   generative AI; cloud vs distributed vs edge; cryptography vs security vs privacy).503. `taxonomy/topic_map.csv` — one row per (openalex topic_id, category_id, weight) used in the YAML (for auditing).5152Constraints:53- Every one of the 302 OpenAlex CS topics must appear in `topic_map.csv` or in the "unmapped" list of ONTOLOGY.md.54- The six AI categories that OpenAlex topics cannot separate well (LLM, foundation models, multimodal, generative AI,55  agents, AI safety) and the small categories (federated learning, sustainable computing, autonomous scientific discovery,56  privacy-preserving computation, blockchain, quantum, edge) MUST have keyword patterns (title and abstract) strong enough57  to reach the threshold on their own; the broad categories (CV, NLP, SE, networks, ...) can rely on topics/venues/arXiv.58- Keyword regexes must be valid Python `re` patterns (double-escape backslashes in YAML strings) and should be59  conservative (word boundaries, avoid single ambiguous tokens such as "agent" or "model").60- Map at least the 600 largest DBLP streams; the mapping may give a stream to several categories.61- Do not invent topic ids: use only ids present in the CSV. Validate the YAML by loading it with Python (`yaml.safe_load`)62  and compiling every regex before you finish; report counts (topics mapped per category, keywords per category).63- Write nothing in the manuscript. Report back a short summary (≤ 30 lines) with the counts and the open ambiguities.6465## Addendum (2026-11-03, after a first attempt failed on output size)6667The first attempt tried to emit `ontology.yaml` in one response and exceeded the 64,000-token output limit. Work68incrementally and keep every single file write under ~6,000 tokens:69- Put the mapping data in Python modules, one per area: `taxonomy/src/area_ai_ml.py`, `taxonomy/src/area_perception.py`,70  … each defining `CATEGORIES = [ {...}, ... ]` dicts with the schema of the brief (ids, weights, patterns as raw strings).71  Write each module with its own Write call; if an area is large, split it into two modules.72- Write `taxonomy/build_ontology.py` that imports the modules, validates (40 leaves, unique ids, topic ids exist in the73  CSV, regexes compile, weights in (0,1]), and generates `taxonomy/ontology.yaml`, `taxonomy/topic_map.csv` and the74  coverage statistics section of `taxonomy/ONTOLOGY.md` (the prose part of ONTOLOGY.md you write by hand, briefly).75- Run `python3 taxonomy/build_ontology.py` (pyyaml: `/opt/homebrew/bin/python3 -m pip install --user pyyaml` or use76  `uv pip install` in a venv) and fix errors until it passes. Never print whole CSVs to your context: use grep/awk/python77  to look up topics by keyword.78
Files · f168fc775ca28a8f4b47385e4e7fc2c168957880
Menu

Theme