Spaces:
Paused
Paused
Commit History
-
feat(extraction): Batch API extractor (~50% cheaper), fix stale cost banner
KevinIsInCoding +1: Claude Fable 5Route entity extraction through the Message Batches API instead of synchronous calls. Offline pipeline, so the 50% batch discount applies with no quality change. Resumable via .batch_state.json (resumes an in-flight batch instead of resubmitting). Drop the no-op prompt-cache prefix (below Haiku 4.5's 4096-token cacheable minimum) and correct the cost banner to ~$0.015 per 10 papers. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>af01504 -
feat: retrieval grounding, trial quality, and drug-name typo suggestions
KevinIsInCoding +1: Claude Opus 4.8Session of improvements to retrieval accuracy, clinical-trial matching, and query robustness for the physician-facing tool. Retrieval grounding & citation integrity: - Grounding gate: suppress spurious semantic matches when a query's focus entity is absent from the corpus (papers=0 → honest "no evidence"), preventing citation-grafting hallucinations. - Landscape-mention labeling: flag papers that name a compound only in full-text pipeline tables (not the abstract) so the model labels such citations instead of presenting them as primary studies. - Keyword search + abstract-scoped grounding helpers in rag/retriever.py. - Stricter synthesis prompt: inline citations, grounding rule, no training- knowledge gap-filling. Clinical trials: - Include Expanded Access Programs (studyType:int exp); tag study_type / is_expanded_access and surface "Expanded Access" as the phase label. - Compound-specific trial matching: match only the queried compound/target (never the KG-expanded gal…6e92226
-
feat: automate ALS seed entities from trials and paper corpus
KevinIsInCoding +1: Claude Sonnet 4.6- Fix _add_trials() to create nodes for novel trial compounds with no paper evidence (type=Unknown, is_trial_derived=True) — directly fixes SPG302/Tazbentetol not appearing as a KG entity - Migrate ALS_SEED_ENTITIES from config.py to data/seeds/manual_seeds.json so domain experts can edit seeds without touching code - Add scripts/derive_seeds.py: auto-derives seeds from DRUG/BIOLOGICAL trial interventions and paper entities above SEED_PROMOTION_THRESHOLD - Add scripts/refresh.py: incremental pipeline orchestrator with state tracking (--since for papers, --upsert for trials, --dry-run support) - Add --since / append mode to ingest_papers.py for incremental ingestion - Add --upsert flag to ingest_trials.py for nct_id-based merge - Promote guess_entity_type() to normalizer.py as a public function Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>e53bbe5
-
feat: RRF merge + cross-encoder reranking for retrieval pipeline
KevinIsInCoding +1: Claude Sonnet 4.6- Replace flat score-merge with Reciprocal Rank Fusion (k=10, top_n=20) combining semantic search (30) and entity search (30) candidates - Add cross-encoder reranking (ms-marco-MiniLM-L-6-v2, top_n=15) loaded once at agent startup for zero per-request overhead - Move citation boost to after cross-encoder so it amplifies relevance rather than corrupting RRF input scores - Raise entity query cap 8 → 12 in search_by_entities() - Add exact NCT ID match in trial lookup (_handle_search step 7) - Update config.py with RETRIEVAL_SEMANTIC_N, RETRIEVAL_ENTITY_N, RETRIEVAL_ENTITY_QUERY_CAP, RRF_K, RRF_TOP_N, CROSS_ENCODER_MODEL, CROSS_ENCODER_TOP_N Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>3bfe897
-
perf(extraction): switch to Haiku + add per-paper retry for missed PMIDs
KevinIsInCoding +1: Claude Sonnet 4.6- EXTRACTION_MODEL: claude-sonnet-4-6 → claude-haiku-4-5-20251001 Expected: 60min → 10min, $1.50 → $0.12 for 500 papers - Refactor _extract_batch to use shared _call_claude() helper - Add retry loop: papers missed by Claude in a batch are retried individually before being recorded as empty (root cause: tool_choice=any only guarantees ≥1 call, not N calls) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>ac8f675
-
feat: initial project scaffold and Stage 2 ingestion pipeline
KevinIsInCoding +1: Claude Sonnet 4.6- Project foundation: config, models, tools, llm, logging, prompts - Tool schemas: extract_entities.json, search_landscape.json - Stage 2 ingestion: - ingestion/pubmed.py: PubMed Entrez client (batch fetch, rate-limit aware) - ingestion/pmc.py: PMC XML full-text fetcher (JATS section parser) - ingestion/semantic_scholar.py: citation count enrichment via S2 batch API - ingestion/clinicaltrials.py: ClinicalTrials.gov v2 ALS trials client - scripts/ingest_papers.py: orchestrates PubMed + PMC + citations - scripts/ingest_trials.py: fetches recruiting ALS trials - Stub modules for Stage 3-5 (rag/, graph/, agents/, app.py, main.py) - MIT License, .gitignore (excludes data/, .env, logs/) - CLAUDE.md architecture guide Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>0ccfe4a