A few ideas to understand before you start. They explain why the app behaves the way it does.
Project folder vs. database¶
| Folder | Database | |
|---|---|---|
| Holds | config, prompts, criteria, schema | references, decisions, extractions, audit trail |
| Files | lit_review.yaml, prompts/, criteria.yaml, schema.yaml | SQLite file (default) or PostgreSQL |
| Shared by a team? | yes, everyone needs the same folder | yes, over PostgreSQL |
The config that defines how the review runs lives in the folder; the data the review produces lives in the database. One database can hold many projects, namespaced by project name.
The config file: lit_review.yaml¶
Most settings are editable from the Settings, Protocol, and Workflow pages, but they all land in lit_review.yaml. The config is assembled in four layers (low → high precedence):
Built-in defaults
A built-in mode preset (
strictorassisted; skipped forcustom)An optional user preset file
Your project’s own
lit_review.yaml
So you only need to write the fields you want to override; everything else inherits.
Workflow modes¶
Each review picks a workflow for each of the three human-in-the-loop stages. These are the single most important choice because they decide who reviews what and what is hidden from whom.
Screening (title & abstract)¶
| Workflow | Who | Blinding |
|---|---|---|
assisted | AI + 1 human | both blinded to each other (PRISMA-trAIce) |
independent | 2 humans | blinded to each other; AI optional reference (Cochrane) |
Screening (full text)¶
The same two options, set separately from the abstract stage. Leave it unset and it follows the abstract stage.
| Workflow | Who | Blinding |
|---|---|---|
assisted | AI + 1 human | the AI’s verdict comes from AI extraction’s per-criterion flag_check, so extraction must have run |
independent | 2 humans | blinded to each other; extraction can come afterwards |
Extraction (full text)¶
| Workflow | Who | Blinding |
|---|---|---|
verify | AI extracts, human verifies/edits | AI value shown, human edits it |
independent | human extracts blind | AI hidden until the human submits |
All three are set on Protocol → Workflow, and can be changed at any time. The common design is AI-assisted at title and abstract, where the volume is, and two humans at full text, where the stakes are:
screening:
workflow: assisted # title/abstract
full_text_workflow: independent # omit to follow the line above
extraction:
workflow: independentA stage’s workflow also decides when a paper is settled there: independent needs two human votes, assisted needs the human’s vote and the AI’s, and an unadjudicated disagreement means the stage is not finished. An unsettled paper does not move to the next stage, and PRISMA counts it as neither included nor excluded.
Blinding¶
To keep the second reviewer honest, the app hides the other reviewer’s verdict until you commit your own:
In
assistedscreening, the AI’s decision is blinded until you decide.In
independentextraction, the AI’s values are hidden until you submit.
Disagreements then surface on the Conflicts pages for reconciliation.
Cross-check¶
A reviewer produces a verdict of their own. A cross-check does something different: it audits a record that already exists, taking it together with the quote offered as its support and asking whether the text backs that up. It runs at both stages on the same principle: at full text it judges an extracted value against the paper, at title/abstract a screening decision against the abstract.
That difference decides where it belongs. Because a cross-check’s input contains the record it judges, it is not independent of it, so it can never count as a second reviewer. Its verdicts stay out of κ and every other agreement statistic, out of conflict resolution, and out of the PRISMA counts, and nothing it finds blocks a submission. It is a signal that a paper is worth a second look — the same role a spell-checker plays, not the role of a co-author.
It runs in two layers: a deterministic one that makes no API calls, and an LLM one that asks a second model for a verdict. The LLM layer must run on a different model from the one that produced the record, since a model agrees with itself far more often than an independent one would.
What the deterministic layer checks differs by stage, because the records do:
| Full text (extraction) | Title/abstract (screening) | |
|---|---|---|
| judged against | the paper’s markdown | the title and abstract |
| checks | verbatim quotes, enum values, empty required fields, a number absent from its own quote | verbatim evidence quotes, criterion IDs that exist, a per-criterion verdict for every criterion, the decision against its own verdicts |
| LLM layer | one verdict per field | one verdict per decision |
At title/abstract the LLM layer is one call per screened paper, which is the whole corpus — the expensive place to turn it on.
Two things it cannot tell you:
A quote that fails to match may still be genuine — PDF-to-markdown conversion mangles passages.
Its agreement rate is not an accuracy measure: the checker sees the value it is judging, so it leans towards agreeing. A reportable accuracy figure needs a human gold standard.
The full description, including how to run it and how to read the badges, is under Data extraction → Cross-check.
Per-stage models¶
Each stage runs on its own model, set in Settings → Models. There is no built-in default: model names date quickly, so ailr asks you to name the one you want rather than shipping a stale choice. Screening sees every record you import, so a cheap, fast model there saves the most; extraction reads whole papers, so it is worth a strong one. Token usage is logged per call; see Reports → API usage. Tokens only, not money: prices change faster than the package ships, so multiply by your provider’s current rates.
The top-level llm: block holds the defaults both stages inherit; each stage may declare its own llm: sub-block that overrides only the fields it sets.
llm:
provider: anthropic # anthropic | openai | gemini (experimental)
screening:
llm:
model: <a cheap model> # abstract screening
workers: 4 # parallel AI calls (default 4; set 1 for one-at-a-time)
extraction:
llm:
model: <a strong model> # full-text extraction
workers: 2 # parallel AI calls (default 2; full-paper prompts are large)AI runs make several calls in parallel (workers above), which shortens large runs considerably. If your API plan has tight rate limits, lower it. A rate-limited call is retried automatically with backoff, so nothing is lost either way.
Reproducibility. Every decision records the model it was produced under (and a seed, on the one provider that accepts one), so the methods export can describe how the review was actually run rather than how the config currently reads. ailr sets no temperature: current models refuse the parameter, so every model samples at its own default. llm.seed is unset by default and only the OpenAI API takes it; the Anthropic and Gemini clients reject it, so setting one there is a false promise of determinism rather than a stricter setting.

Your domain content¶
The criteria, variables, and prompts are yours; the tool never writes them. The criteria and variables are shared definitions you set once on the Protocol page; the prompts are per-stage. All are stored as files in the project folder and referenced from lit_review.yaml:
| Your content | File | Edited on |
|---|---|---|
| inclusion/exclusion criteria (structured, shared by both stages) | criteria.yaml | Protocol → Criteria |
| extraction variables (the fields to extract) | schema.yaml (+ extraction_variables.json mirror) | Protocol → Variables |
| the screening prompt | prompts/screening.txt | Abstract → Workflow → Prompt |
| the extraction prompt | prompts/extraction.txt | Full text → Workflow → Prompt |
| the cross-check prompt (optional; a built-in default is used when absent) | prompts/crosscheck.txt | Full text → Workflow → Prompt |
| the screening cross-check prompt (optional; same) | prompts/crosscheck_screening.txt | Abstract → Workflow → Prompt |
| optional value definitions | codebook.yaml | n/a |
The structured criteria (criteria.yaml) are the single source of truth. Because both stages reference the criteria by the same locked IDs, every AI decision is recorded per criterion (PASS / FAIL / UNCERTAIN, with reason and quote). See Set up your protocol.
If you open a prompt file to edit it, leave the markers {{criteria}} and {{schema_md}} in place; the app fills them in with your criteria and schema at run time (see How AI extraction works).
Bibliographic metadata (title, authors, year, journal, DOI) comes from the imported record and is joined into exports by source_id; the AI only extracts what the full text adds.
How AI extraction works¶
Designing an extraction has two halves you plan together: the template (which variables to pull out) and the prompt (how to read the paper and fill them well). Thinking about one means thinking about the other: a field is only as good as the instruction that fills it, and an instruction needs to know what it is filling.
You don’t have to worry about output format. When the AI runs, the app constrains its answer into your exact JSON structure (your field names, types, and shapes), so a result is always well-formed, with every value paired to a verbatim quote. The prompt then only affects how well each field is filled, never the shape.
So the two are complementary in design but independent in mechanism: plan them together, but know that the prompt can never change the structure. This split is worth understanding before you customize anything. See How AI extraction works.