Review a statistical program for logic errors and hidden assumptions
AI reads an R or SAS program and lists suspected logic problems, unclear sections and undocumented assumptions, with line references. It is a prompt for human review, not independent QC.
Untested ideaMedium risk
Evidence
Untested idea. No clinical-programming evaluation found. Published tests of LLM-generated unit tests (Java) concern a different task. Prompt not run.
Steps
- Paste a short program section.
- Ask for a line-referenced review.
- Verify each finding by running code.
- Reject unsupported claims.
- Keep review notes.
Prompt
This is the prompt, typed out. No assistant reply is shown.
You
Review the program below. List, with line references: possible logic errors (population filters, joins, missing handling, rounding), sections where intent is unclear, undocumented assumptions and hard-coded values. For each, state what you would test to confirm. Do not rewrite the code. If unsure, say so.
Rules: use ONLY the input below. Tag anything the input does not state as OPEN QUESTION. Never invent numbers; use placeholders such as xx. Do not claim anything is verified.
INPUT:
[paste input here]
Verify before you use it
- Every finding was reproduced or refuted by running code.
- No finding referred to a non-existent line.
- Independence of QC is preserved.
- Population and denominator logic checked by a human.
- Review result is recorded per your SOP.
How it fails
The AI reports confident bugs that are not there and misses subtle derivation errors.
Data rule: No confidential production code or data. Use public or invented programs.