Spaces:
Paused
Paused
Commit History
-
feat(trials): RAG-grounded mechanism summary per clinical trial (#34)
KevinIsInCoding +1: Claude Opus 4.8Unverified signature* feat(ui): headless UI-verification harness (run-ui skill) + fix combobox JS Adds a reusable, deterministic UI check for the Clinical Trials tab so UI changes stop shipping blind. Building it surfaced and fixed a real production bug. - .claude/skills/run-ui/: launches the app in UI-smoke mode and drives the tab in headless Chromium (Playwright), asserting placeholder, 3-char gate, clean picked value, one-line labels, and a search result — plus a screenshot. Exits non-zero on failure (CI-usable). SKILL.md documents usage + the gotchas learned. - app.py: CANDLE_UI_SMOKE mode skips the heavy startup loads (cross-encoder, ChromaDB, graph, Anthropic client) so UI tests boot in ~25s instead of ~60s. - FIX: the combobox in-box placeholder + 3-char gate never ran — Gradio ignored `js=`/`demo.load(js=)` in this version. Inject the script via gr.Blocks(head=...) with a MutationObserver (the tab renders lazily). This was broken on the live Space too; now verified working end-to-e…4750fb9
-
feat(trials): filters, polish & eligibility on main (recover #29 + #30) (#32)
KevinIsInCoding +1: Claude Opus 4.8Unverified signature#28 (autocomplete) reached main, but stacked PRs #29 (filters + polish) and #30 (eligibility) merged into their base branches, not up to main. This lands their content on main so the full Clinical Trials tab work ships: study-type/status filters + defaults, layout & number-consistency polish, and enrollment/eligibility (ingestion capture, backfill script, active-trial display). Data change: run scripts/upload_data.py --only trials before deploying. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>bc94ae4
-
refactor(prompts): consolidate system prompts + docs/lockfile housekeeping (#23)
KevinIsInCoding +1: Claude Opus 4.8Unverified signature* refactor(prompts): consolidate all system prompts into prompts.py extraction/extractor.py and ingestion/clinicaltrials.py each defined their own local system prompt, and prompts.py held a stale, unused EXTRACTION_SYSTEM that had drifted from the one the extractor actually ran. Make prompts.py the single source of truth: move the live extraction and trial-target prompts there (byte-identical to what ran, so extraction output is unchanged) and import them. Now all four system prompts (EXTRACTION_SYSTEM, TRIAL_EXTRACTION_SYSTEM, LANDSCAPE_SYSTEM, SYNTHESIS_SYSTEM) live in prompts.py, matching CLAUDE.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore: doc paper count 500→10,000 and sync uv.lock to pinned gradio CLAUDE.md described the corpus as ~500 papers; it is now ~10,000. uv.lock had drifted to gradio 6.20.0 while pyproject pins gradio==6.14.0 — re-lock so the lockfile matches the committed pin. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> ---------…3b2b5d9 -
feat(trials): facility & geography search + targeted mechanism & explainable evidence tier (#22)
KevinIsInCoding +1: Claude Opus 4.8Unverified signature* feat(trials): facility & geography trial search with evidence enrichment Physicians can now find ALS trials by facility ("trials at Mass General Hospital") or geography ("trials in NY"), with each result enriched by surrounding research evidence. - ingestion: _flatten_trial() parses contactsLocationsModule so each trial persists a locations list (facility/city/state/country/status/lat/lon) plus central contact phone/email; TrialSummary gains matching fields. - trials_query.py (new): search_trials_by_location() (state abbrev→name, token-substring facility match, recruiting filter) and enrich_trial() (key papers via the RAG retriever + citation boost, sibling trials for the same compound, heuristic Strong/Moderate/Emerging evidence tier), plus an HTML renderer. - agent: new find_trials_by_location tool wired into RESEARCH_TOOLS and dispatched in research_agent; prompt guidance added for when to use it. - app: dedicated "Clinical Trials" tab (facility/state/city/status i…f77eaaf
-
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(trials): replace hardcoded entity regex with LLM extraction
KevinIsInCoding +1: Claude Sonnet 4.6- Remove _KNOWN_TARGETS regex list — cannot handle novel compounds like AMX0114 - Add extract_target_entities_llm(): batches 10 trials per Claude Haiku call, extracts biological target (gene/protein) not drug name, canonicalizes via extraction/normalizer. AMX0114 now correctly maps to TARDBP. - Add data/tools/extract_trial_targets.json tool schema - Add TRIAL_EXTRACTION_TOOLS export to tools.py - Widen default status filter from RECRUITING-only to also include NOT_YET_RECRUITING and ACTIVE_NOT_RECRUITING - ingest_trials.py: --status now accepts multiple values; creates Anthropic client and passes it to fetch_als_trials() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>0569d05
-
fix(pmc): add rich progress bar to get_pmcids (499 calls, ~3 min)
KevinIsInCoding +1: Claude Sonnet 4.6Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>83263a0 -
fix(pmc): use per-PMID elink instead of batch to preserve ID mapping
KevinIsInCoding +1: Claude Sonnet 4.6Batch elink merges all source IDs into one LinkSet — no way to map which PMC ID belongs to which PMID. Send one at a time instead. Also removes defunct NCBI ID Converter API (returning 404). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>45900d6 -
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