A table of what the literature says about a set of things (ten genes, eight teaching methods, a family of materials) is one of the most useful things an agent can build for you. It is also the place where language models fail most visibly: references that look right and do not exist. This unit is about building such a table so that every row can be trusted.
Look papers up, do not remember them. The agent writes a script that asks literature databases through their APIs.
Keep what came back. Raw downloads are saved, dated and never edited.
Every claim carries a quote from the abstract, so it can be checked.
Verify in layers: a script resolves every PMID and DOI and compares titles; you read a random sample.
Export and publish: BibTeX, Zotero, and the table on your page.
A hands-on unit. Pulling numbers out of the full-text papers comes next (Extracting data from PDFs). Search connectors that plug PubMed straight into the agent come in Making the agent yours.
Ten genes, one week, and a reader who will check every reference
The same job exists in every field: what is known about each item in a set?
Field
The set
What you want per item
Molecular biology
10 genes from one pathway
function, disease links, model organisms
Materials science
8 electrolyte materials
conductivity, stability, how measured
Education
8 teaching methods
effect on learning, level, kind of study
Ecology
12 invasive species
spread, impact, control methods
Public health
6 screening programmes
uptake, outcome, country
The worked example uses genes; a teaching-methods version runs alongside it. The method is the same.
Looking papers up beats remembering them
A literature table is built in six steps, and two of them are yours
An API is a web address that returns data instead of a page
Five free literature APIs cover most needs
Database
Covers
Identifiers
Key needed?
PubMed (NCBI E-utilities)
biomedicine and life sciences
PMID, often DOI
no; a free key raises the speed limit
Europe PMC REST API
PubMed plus preprints and open-access full text
PMID, PMCID, DOI
no
OpenAlex
all fields, very large
DOI, OpenAlex ID
no for small searches; a free key for more
Semantic Scholar
all fields, citation links
DOI, S2 ID
no; a key can be requested
Crossref
metadata of every DOI registered there
DOI
no; add your e-mail to get better service
All five are free to use for this kind of work. Each has a rate limit (for example PubMed: 3 requests per second without a key, 10 with one). Limits and terms change: the agent should read the current documentation page, and so should you.
Web search is fine for exploring; the table comes from the APIs
The agent’s web search
quick overview, finding the right words
results depend on the search engine and the day
returns pages, not records
easy to pick up a blog, a news story or a predatory journal
A script that calls the APIs
one query per item, written down
every hit counted, not only the top ten
returns records with IDs
reruns next year with the same query
Use web search to learn the vocabulary of a new topic. Build the table from the database records.
Be polite to the APIs, and keep keys out of prompts and git
Worked example: ten genes of the Hedgehog signalling pathway
The non-biology version: eight teaching methods, searched in OpenAlex
The set: flipped classroom, peer instruction, retrieval practice, spaced practice, worked examples, problem-based learning, team-based learning, think-pair-share.
The question: what evidence is there that each method improves learning in higher education?
Databases: OpenAlex for search, Crossref to check DOIs. PubMed covers little of education research.
Identifiers: DOI only. No PMIDs.
Evidence types: meta-analysis, randomised trial, quasi-experiment, survey, case report from one course.
Watch out for: method names that are also everyday words (“worked examples”, “spaced”), and many small single-course reports.
Step 1: write the search plan before you search
# search-plan.md
Question: For each of the ten Hedgehog pathway genes, what are the main
findings on its role in human development and disease?
Database: PubMed (E-utilities); Europe PMC for open-access status
Query: (<SYMBOL>[tiab] OR <full name>[tiab]) AND hedgehog[tiab]
Full names: SMO = smoothened, SUFU = suppressor of fused, ...
Limits: 2010 onwards; English; humans or mouse models
Per gene: top 20 by relevance -> keep at most 4 papers
Keep: primary studies and reviews; at most 1 review per gene
Exclude: papers where the gene is only mentioned in passing
Date run: 2026-11-23
Writing it first means you decide what counts, not the search engine. It also goes into your README as the method.
Gene symbols are ambiguous, so the query must handle it
Step 2: the prompt asks for a script, raw downloads and a log
Read search-plan.md. Write a Python script scripts/search.py that runs
the PubMed query in the plan for each of the ten genes, using the NCBI
E-utilities API. Check the current E-utilities documentation first.
- stay under 3 requests per second; set tool and email (read the email
from the file .env, which is already listed in .gitignore)
- save every raw response under raw/pubmed/<today's date>/, one file per
gene, plus the abstracts of the top 20 records per gene
- write raw/pubmed/<today's date>/log.txt: query, number of hits and
number saved for each gene
- never edit files in raw/ after they are written
Do not add any paper from memory. Every record must come from the API.
Show me the log when done.
The agent writes the script, runs it and reports what it found
Raw downloads are kept and never edited
Step 3: each claim comes with the words that support it
Evidence types tell a reader how much a claim can carry
Evidence type
Example
What it can support
review
a narrative review of GLI proteins
what the field believes; not new evidence
human genetics
variants found in patients with a syndrome
a link in people
human tissue or cohort
expression in tumour samples and survival
association, not cause
animal model
knock-out mouse with a bone defect
cause, in that animal
cell experiment
knock-down in a cell line
mechanism, in that system
computational
database or network analysis
a hypothesis
Agree the categories with the agent before it fills the column. Then check a few: the agent guesses this from the abstract.
The prompt for the table forbids claims without a quote
Build results/literature_table.csv from the saved records in raw/ only.
Columns: gene, claim, pmid, doi, year, title, journal, evidence_type, quote.
- at most 4 papers per gene, following the rules in search-plan.md
- claim: one sentence, no stronger than the abstract (keep "associated",
"may", "in mice")
- quote: the sentence(s) from the abstract that support the claim,
copied exactly, character for character
- evidence_type: one of review, human genetics, human tissue or cohort,
animal model, cell experiment, computational
- pmid, doi, year, title, journal: copied from the record, never typed
If no abstract supports a useful claim, leave the gene with fewer rows
and say so. List every row you were unsure about.
Verification has five layers, and a script can do three of them
The verification script resolves every ID and compares titles
A real quote can still carry a wrong claim
Read a random sample yourself, and act on what you find
Retracted papers and preprints need a flag
Retractions. PubMed marks retracted papers with the publication type Retracted Publication, and the retraction notice as Retraction of Publication. The verification script should flag both.
Corrections and expressions of concern are linked from the PubMed record. Worth a look for any paper the table leans on.
Preprints (bioRxiv, medRxiv, and in Europe PMC and OpenAlex) are not peer-reviewed. Mark them in their own column, or leave them out by rule in the search plan.
Predatory journals turn up in OpenAlex and web search more than in PubMed. If you do not know a journal, look it up before you cite it.
The agent can check flags in the records. Whether a journal is trustworthy is your call.
Step 5: BibTeX for writing, Zotero for keeping
Step 6: the table goes on your page, with a link to every source
The teaching-methods version: same steps, other database, other evidence
Step
Hedgehog genes
Teaching methods
Plan
one query per gene, symbol and full name
one query per method, with synonyms (“flipped classroom” OR “inverted classroom”) and “higher education”
Search
PubMed E-utilities
OpenAlex works search
Raw
raw/pubmed/<date>/
raw/openalex/<date>/
Abstracts
in the PubMed record
in OpenAlex for many, not all papers; the rest have none
Abstract ≠ paper. Abstracts oversell. Read the sample in full when you can.
Bad query. Symbol clashes, missing synonyms, a too-narrow filter. Read the hit counts.
Silent gaps. A gene with no rows, not reported. Count rows per item.
Keys in the wrong place. In the prompt, in the script, on GitHub.
Trusting the agent’s own check. “All references verified” is a claim. Read the report and the sample yourself.
Summary
Concept
Key fact
Look up, do not remember
every row comes from a database record, via a script
API
a web address that returns data for programs; PubMed, Europe PMC, OpenAlex, Semantic Scholar, Crossref are free
Politeness and keys
respect rate limits; keys in .env, never in prompts, scripts or git
Search plan
question, queries (symbol and full name), limits, rules, date, written first
Raw folder
what the database said that day; never edited
Summary (continued)
Concept
Key fact
Claim + quote
the quote is copied exactly, so a script can find it
Evidence type
a fixed list; tells the reader how much a claim can carry
Verification
script: IDs resolve, titles match, quotes found, retractions flagged; you: claims vs quotes, random sample
Export
BibTeX from the DOIs; Zotero by import or by identifier
Publish
the table on your page, a link per row, method and AI use stated
Next (Extracting data from PDFs): from abstracts to full text: pull one number out of the open-access papers you just found, with the page it came from, and check it with a second agent.