Skip to content

Latest commit

 

History

History
89 lines (59 loc) · 10.6 KB

File metadata and controls

89 lines (59 loc) · 10.6 KB

Pre-built Domains

Epistract ships with four domains out of the box. Each is a self-contained package under domains/<name>/ — a domain.yaml schema, a SKILL.md extractor instruction file, an epistemic.py rules file, and a workbench template (chat persona + narrator persona + entity colors). Adding a new domain takes ~15 minutes via /epistract:domain (see ADDING-DOMAINS.md).

Domain coverage at a glance

Domain Schema Scenarios validated Specialty pipeline Use cases
drug-discovery 13 entity / 22 relation types 6 scenariosS1 PICALM / Alzheimer's (target validation, 183 nodes / 478 edges) · S2 KRAS G12C (CI, 140 / 432) · S3 Rare Disease (due diligence, 110 / 278) · S4 Immuno-oncology (combinations, 151 / 440) · S5 Cardiovascular (cardiology, 90 / 245) · S6 GLP-1 CI (V3 rebuild, 278 / 855, full narrator briefing — see SHOWCASE-GLP1) RDKit + Biopython molecular validation; prophetic-claim detection from patents; structural-biology doctype short-circuit Biomedical literature, patents, clinical trial reports — competitive intelligence, target validation, regulatory / adverse-event capture
clinicaltrials 12 / 10 1 scenarioS7 GLP-1 Phase 3 Trials (10 CT.gov protocols, 142 / 395, post---enrich 177 high-evidence relations — see SHOWCASE-CLINICALTRIALS) Phase-based evidence grading (Phase 3 + N≥300 → high; Phase 2 → medium; Phase 1 / observational → low); optional --enrich from CT.gov v2 + PubChem PUG REST ClinicalTrials.gov protocols + IRB submissions + clinical study reports — NCT capture, blinding/enrollment signals, head-to-head comparison framing
fda-product-labels 17 / 16 1 scenarioS8 FDA Product Labels (7 SPL labels, 81 nodes / 149 edges, 1,579-word narrator briefing — see SHOWCASE-FDA) Four-level FDA evidence-tier classifier (established / observed / reported / theoretical), in addition to the v3 epistemic vocabulary FDA Structured Product Labeling (SPL) — drug products, indications, contraindications, boxed warnings, drug interactions, pharmacovigilance, lab-test monitoring
contracts 11 / 11 0 scenarios — schema scaffold; showcase walk-through describes the persona; bring your own corpus Cross-contract conflict detection, obligation gap scoring, risk indicators, SLA / force-majeure reasoning Event / vendor contract analysis, procurement portfolio review, legal due diligence

Reading the table. Schema is the static shape — entity types and relation types declared once. Scenarios validated is the track record — how much real-world corpus the domain has actually been run against, and how many narrator briefings have surfaced refinements that contributors folded back into the domain config. A domain with six scenarios has had its persona, epistemic rules, and entity-type coverage exercised against varied source material; one with zero is a schema waiting for its first run. The framework itself doesn't auto-learn across scenarios today — refinements are human-mediated. (Issue #15 tracks an aspirational cross-scenario knowledge persistence layer.)

All four live in domains/ as self-contained packages — schemas are human-readable YAML; inspect any of domains/drug-discovery/domain.yaml, domains/contracts/domain.yaml, domains/clinicaltrials/domain.yaml, or domains/fda-product-labels/domain.yaml. To start a new scenario on an existing domain, just run /epistract:ingest <your-corpus> --domain <name> — no schema work needed.


Community-maintained domains

These domains are maintained on community forks and don't ship with the framework yet. Install by checking out the fork.

Domain Schema Source
pharmacovigilance 10 entity / 11 relation types chrisdavidson/epistract feat/pharmacovigilance-domain (PR #5) — adverse-event reports (FAERS / VAERS / MedWatch) with Bradford-Hill causality vocabulary, MedDRA Preferred Term + WHO ATC nomenclature, reporter-type confidence calibration (HCP > consumer > lawyer), and a scripts/fetch_faers_corpus.py for fetching reports from the FDA OpenFDA API.

Showcase artifacts

drug-discovery — S6 GLP-1 Competitive Intelligence

34 documents (10 patents + 24 PubMed abstracts) → 278 nodes, 855 edges, 61 prophetic claims, 1,166-word narrator briefing.

clinicaltrials — S7 GLP-1 Phase 3 Landscape

10 CT.gov protocols (SURPASS, SURMOUNT, STEP, PIONEER, SUSTAIN, ACHIEVE) → 142 nodes, 395 edges, 1,197-word narrator briefing.

fda-product-labels — S8 FDA Product Labels

7 SPL labels (Ozempic, Wegovy, Mounjaro, Humira, Gleevec, Lipitor, Jantoven) → 81 nodes, 149 edges, 1,579-word narrator briefing. Four-level FDA evidence-tier classifier (new in v3.2).

contracts — schema scaffold

No bundled corpus graph in the public repo — the contracts domain is designed for private legal / procurement work.

  • Showcase walk-through: docs/showcases/contracts.md
  • Domain package: domains/contracts/ — schema, SKILL.md, epistemic.py, workbench template with a worked 57-document persona
  • Run on your own corpus: /epistract:ingest <your-contract-corpus> --domain contracts

GitHub renders .html files as source, not interactive pages — clone the repo and open the graph.html links locally in a browser to interact with the force-directed graphs.


Adding a new domain

A domain is 11–17 entity types and 10–22 relation types defined in YAML, plus a persona string and an epistemic rules file. No pipeline code changes required.

/epistract:domain --input ./sample-docs/ --name my-domain

The wizard runs a 3-pass LLM schema discovery against your sample documents, proposes entity types and relation types with confidence scores, asks about your analyst persona (the voice the chat panel and narrator will use), and writes a complete domain package to domains/my-domain/.

Full walk-through, including manual schema creation and the --schema reproducibility path: ADDING-DOMAINS.md.