Diversity score computation

← All Specs

Goal

Implement diversity score computation to measure breadth and variety of hypotheses, analyses, and knowledge contributions across SciDEX domains.

Acceptance Criteria

☐ Diversity score algorithm designed and implemented
☐ Score computed across relevant dimensions
☐ Changes tested and verified

Approach

  • Define diversity dimensions (domain, methodology, target entities)
  • Implement scoring algorithm
  • Integrate with existing scoring pipeline
  • Test and commit
  • Dependencies

    (none listed)

    Dependents

    (none listed)

    Work Log

    2026-04-17 — Reopened task: integration of diversity_score into gap pipeline & UI

    Prior work: compute_diversity_score() and update_all_diversity_scores() already exist in gap_pipeline.py (committed under other task IDs). The knowledge_gaps.diversity_score column
    is populated and the CLI flag --compute-diversity works.

    Changes made (this attempt):

  • gap_pipeline.py — should_reopen_gap(): Added low-diversity criterion.
  • Gaps with diversity_score <= 1 that already have analyses are flagged for re-opening
    so agents can explore alternative mechanistic angles.

  • api.py — gap detail page (/gap/{gap_id}): Added "Mechanistic Families" metric
  • card to the Living Dashboards grid, showing the diversity_score value.

  • Both changes tested and verified.
  • File: t_diversity_score_spec.md
    Modified: 2026-04-28 01:38
    Size: 1.4 KB