CSAG Lite¶
CSAG Lite is the smallest useful subset of a Conditional Scientific Argumentation Graph (CSAG). It records what a manuscript claims, the evidence the manuscript offers, and how each piece of evidence bears on each assertion. Every assertion has a context, and every assertion and evidence item is grounded to a text span. A Lite artifact is valid on its own and small enough to write or review by hand.
Staged workflow¶
The csag command drafts and checks a Lite artifact in seven stages. Run the
commands from the repository checkout. The commands write to work/paper/;
the work directory is your choice. Keep every file of one manuscript in the
same work directory, because later stages find their inputs by name.
-
Ingest the manuscript. The input is a PDF or a Markdown file. The output is canonical Markdown plus the
article.jsonandsection_audit.jsonsidecars.For a PDF, pick a conversion mode with
--pdf-mode:ocrsends the PDF to the OCR (optical character recognition) API,localconverts it with LiteParse, andautotries the OCR API first when a key is available and falls back to LiteParse. The OCR API needs a key inOCR_API_KEYorNELLI_API_KEY; LiteParse needs thelocal-pdfextra (uv sync --extra local-pdf). -
Scaffold a draft
paper_extraction.jsonfrom the Markdown and the article sidecar.uv run csag scaffold work/paper/manuscript.md \ --article-json work/paper/manuscript.article.json \ --output work/paper/paper_extraction.json \ --profile liteEdit the draft: replace the
TODOplaceholders and add the manuscript's assertions, evidence items, and evidence links. The extraction rules are inskills/csag-extraction/SKILL.md. -
Inspect the work directory. The command lists which files are present and prints the next command to run.
-
Validate the extraction with the
liteprofile. -
Build the quality report with the
litedocument scope. -
Lint the stable IDs and the grounding.
-
Export the artifact. Canonical JSON and RO-Crate (Research Object Crate) are lossless; Interoperability describes the other formats. The RO-Crate output directory must be empty or not exist.
Validation, quality, and lint reports record SHA-256 hashes of their inputs.
After an input changes, csag inspect reports the affected report as stale
and prints the command that refreshes it.
The Lite object set¶
A Lite artifact uses six classes.
| Class | What it records |
|---|---|
PaperExtraction |
The root document: identity and version metadata (id, title, schema_version, validator_version) and the assertion, evidence item, and evidence link arrays. |
TextSpan |
A pointer into the source Markdown (document, section, character offsets, exact text) that grounds an assertion or an evidence item. |
Assertion |
One claim the manuscript makes, in natural language, with a claim_role and a normalization_status. |
Context |
The scope under which an assertion or evidence item holds, such as the organism, cell type, or model system. |
EvidenceItem |
An observation or result the manuscript reports as evidence, with its own contexts when needed. |
EvidenceLink |
A typed connection from an evidence item to an assertion with a polarity of supports, refutes, mixed, or inconclusive. |
The lite profile does not check any other class, such as artifacts,
datasets, entities, studies, experiments, inference steps, assertion relations,
critiques, knowledge gaps, and QA items. Add such objects when the source
supports them and a downstream task needs them. Validation
profiles lists which module each class belongs to.
What the lite profile requires¶
The lite profile checks structure and grounding. It does not require
curated criticality, falsification criteria, or extraction activities. It
requires that:
- the root
PaperExtractionhasid,title,schema_version, andvalidator_version, and theassertions,evidence_items, andevidence_linksarrays; - the artifact contains at least one context, one assertion, one evidence item, and one evidence link;
- every assertion has an
id,assertion_text, a validclaim_role, a validnormalization_status, at least one context whose ID resolves to a context in the same artifact, and at least one text span; - every evidence item has an
idand at least one text span; - every evidence link has an
id, anevidence_itemreference, anassertionreference, and a validpolarity, and both references resolve.
Worked example¶
A complete, valid Lite artifact is in examples/lite/. Validate it with: