Demo · Clinical
This track follows one worked example for a clinical operations and quality-improvement audience: a three-clinic network wants to know which sites meet their glycemic (HbA1c) targets, and whether a follow-up call pilot at one site increased rechecks. You direct a coding agent through the same workflow used in the imaging demo track: inspect the inputs, audit and clean them, define the study population, analyze, and write up, but the data are a mix of spreadsheet, document and database files and the analysis is an observational comparison.
You do not need programming experience to follow along. Each step explains the background, gives a prompt to paste, shows what a good result looks like, and lists what to check. Steps marked as optional or advanced can be skipped.
Case study overview
The exercises follow a synthetic multi-site clinical dataset consisting of encounter logs, performance benchmark spreadsheets, a clinical trial protocol, staff newsletters, and unstructured triage notes:
raw files → profile → plan and clean → cohort → analysis → references → abstract
│
├─→ dashboard, Word/Excel export
└─→ reusable tool and skill → Git
The workflow addresses three clinical research questions: an operational audit (evaluating site adherence to glycemic targets), an observational study (measuring whether post-discharge outreach correlates with recheck visits while adjusting for confounders), and an optional policy analysis (assessing whether expanded clinic hours reduced emergency utilization).
What is distinctive in this example
- Many file formats. Spreadsheets, Word and PDF documents, a web page and a database all need to be read, and each loses something in conversion.
- Problems inside the records. Mixed units, duplicates, spelling variants and bad dates are found by code, and the cleaning decisions are written down.
- An observational analysis. Crude and adjusted estimates, with a second agent reviewing the work.
All data in this example is synthetic.
Each demo module follows a standardized structure:
- Background: Core context and prerequisites for the immediate task.
- General methodology: Reusable prompt patterns and computational techniques applicable to any dataset.
- Workshop example: A concrete demonstration using this track's benchmark dataset.
- Verification criteria & common pitfalls: Targeted guidance for evaluating outputs and troubleshooting discrepancies.
- Supporting concepts: Direct references back to foundational principles in the concept track.
Modular progression and checkpoints
You do not need to execute the demo from start to finish in a single pass. Every exercise defines an explicit starting state, consisting of either the initial dataset or a saved checkpoint reflecting earlier results. The Setup guide provides instructions for restoring any checkpoint, allowing you to jump directly into specific exercises.
Exercise categories
| Category |
Description |
| Full step |
Core stages of the research pipeline |
| Quick step |
Focused, high-leverage administrative or environment checks |
| Optional detour |
Deep-dive tasks that enrich the analysis without blocking subsequent steps |
| Advanced |
Exercises requiring external API credentials or cloud budget |
Adapting to proprietary data
The general methodologies apply universally to empirical datasets. The workshop example demonstrates how these techniques operate on data with known answers. Before adapting these workflows to proprietary or sensitive institutional data, consult Privacy and data handling and Secrets.
Contents
Start
| Step |
Kind |
Time |
What you do |
| Setup |
Setup |
|
Restore the data kit and any starting point you need. |
| Orient the agent in a folder |
Quick step |
3 min |
Direct the agent to audit local project files, establishing environmental grounding and identifying files requiring specialized parsers. |
| Prepare your environment |
Quick step |
5 min |
Direct the agent to audit local dependencies, initialize an isolated project virtual environment, and document lockfile-pinned setup procedures. |
| Step |
Kind |
Time |
What you do |
| Read and summarize text files |
Full step |
5 min |
Direct the agent to inspect and synthesize project-local text files, validating source provenance and avoiding copy-paste truncation. |
| Read spreadsheets, documents, and PDFs |
Full step |
7 min |
Ingest XLSX, DOCX, and PDF containers, auditing structural extraction compromises such as merged cells, table boundaries, and OCR artifacts. |
| A first answer from raw data |
Full step |
6 min |
Generate an initial exploratory estimate from uncleaned data, requiring explicit definitions and denominators to establish an uncleaned baseline. |
2. Clean the data
3. Research analysis
4. References and writing
| Step |
Kind |
Time |
What you do |
| Find references from a bibliographic database |
Full step |
9 min |
Build a verified BibTeX bibliography via programmatic API retrieval (PubMed E-utilities), establishing a reproducible search log and eliminating hallucinated citations. |
| Build references from links you provide |
Optional detour |
6 min |
Construct an auditable BibTeX bibliography from researcher-curated URLs, using DOI content negotiation and PMID lookups while barring model speculation. |
| Write a research abstract as LaTeX, with citations |
Full step |
9 min |
Author a structured scientific abstract in LaTeX from empirical results files and a verified bibliography, compiling a publication PDF and tracing numerical claims to their source. |
5. Outputs for others
| Step |
Kind |
Time |
What you do |
| Build a dashboard as a single web page |
Full step |
7 min |
Compile an interactive, self-contained HTML research dashboard displaying aggregated metrics and audit counts without external runtime dependencies. |
| Export to Word and Excel for collaborators |
Optional detour |
6 min |
Convert plain-text source files into DOCX and XLSX deliverables for external collaborators, auditing formatting trade-offs and preserving master text sources. |
6. Make it repeatable
Advanced
| Step |
Kind |
Time |
What you do |
| Use a secret safely |
Advanced |
7 min |
Configure API credentials securely via restricted .env environment files and .gitignore, preventing secret leakage into transcripts and version control. |
| Classify many records with a language-model API |
Advanced |
12 min |
Execute batch record classification via programmatic API calls with dry-run estimation, incremental state checkpointing, and validation against a benchmark sample. |
Track navigation