Goal
Score open knowledge gaps with the landscape-gap quality rubric so SciDEX can prioritize the most actionable and scientifically useful gaps. Component scores should reflect specificity, evidence coverage, hypothesis density, debate depth, and actionability.
Acceptance Criteria
☑ The selected open gaps have gap_quality_score values between 0 and 1
☑ Component scores are populated where the schema supports them
☑ Scores are based on surrounding evidence and artifact coverage, not placeholders
☑ The before/after unscored-gap count is recorded
Approach
Query open gaps without gap_quality_score, prioritizing high priority_score and importance_score.
Inspect adjacent hypotheses, debates, papers, KG edges, and datasets.
Apply the landscape-gap rubric and persist the composite plus component scores.
Verify score ranges and count reduction.Dependencies
quest-engine-ci - Generates this task when queue depth is low and unscored gaps exist.
Dependents
- Gap routing, missions, debate scheduling, and Exchange funding depend on quality-scored gaps.
Work Log
2026-04-21 14:27 UTC — Slot 0 (minimax:73)
- Task started: needed to score 30 open gaps lacking gap_quality_score
- Found gap_quality.py scoring module exists at scidex/agora/gap_quality.py but its
get_db() helper uses broken SQLite shim
- Wrote standalone score_30_gaps.py using direct psycopg connection
- Applied 5-component rubric: specificity (heuristic gene/pathway match), evidence_coverage (paper count via specific terms), hypothesis_density (debate sessions), debate_depth (quality_score of linked debates), actionability (keyword heuristics)
- 30 gaps scored successfully; all scores in [0,1]
- Before: 2858 unscored open gaps, 231 scored
- After: 2828 unscored open gaps, 261 scored
- Verification: acceptance criteria met
- Committed and pushed
2026-04-22 16:45 UTC — Slot (minimax:73)
- Task still necessary: 2558 unscored open gaps remain
- Fixed two bugs in score_30_gaps.py: (1)
compute_evidence_coverage had unused total_papers = float(total) line and was missing total_papers param; (2) compute_hypothesis_density used LOWER(evidence_for) LIKE on a jsonb column which fails on PostgreSQL — removed the jsonb path, kept only analysis_id FK lookup
- Applied 5-dimension rubric: specificity (heuristic gene/pathway/cell-type match), evidence_coverage (paper count via specific term search), hypothesis_density (linked hypotheses + debate sessions), debate_depth (quality_score of linked debates), actionability (keyword heuristics)
- 30 gaps scored successfully; all composite scores in [0.205, 0.573], within [0,1] range
- Before: 2558 unscored open gaps, 531 scored
- After: 2528 unscored open gaps, 561 scored
- Verification: acceptance criteria met
- Committed and pushed
2026-04-21 21:36 UTC — Slot 73 (minimax:73)
- Fix for merge gate rejection: hardcoded PostgreSQL password in
_PG_DSN
- Replaced
import psycopg + _PG_DSN = "dbname=scidex user=scidex_app password=scidex_local_dev host=localhost" with from scidex.core.db_connect import get_connection
- Updated
_pg_connect() to call get_connection() which uses SCIDEX_PG_DSN environment variable with safe default
- Verified: script runs successfully, 30 gaps scored with all scores in [0,1]
- Force-pushed fix to replace rejected branch