Evaluating and improving autonomous research loop quality
Evaluating and improving autonomous research loop quality: prompt engineering and output assessment
- Items with the Research Skill Output section (§0–§7) produce dramatically better outputs: avg 12.8 sources checked vs. 3.1 without it, and avg 43 key findings vs. 14. The section is the most impactful quality lever already deployed
- 40% of pre-2026-03-03 items have at least some sources listed but not consulted; 20% (4/20) have all sources unchecked. This is the primary source engagement failure and is prompt-caused: no explicit instruction existed to mark sources `` when consulted
- The current `research-prompt.md` lacks an instruction to search `Research/completed/` for prior related work before starting a new item. As the corpus grows beyond 20 items this gap becomes a structural deficiency: each new item that ignores prior completed work duplicates effort and misses synthesis opportunities
- Priority ordering in the loop is correct and respected in practice: `research-prompt.md` contains explicit `priority: high → medium → low` rules, confirmed by both document inspection and observed execution order. No fix required
- Chain-of-thought prompting in the form of structured step decomposition (§1 → §2 → §6) is the mechanism behind the Research Skill Output section's quality improvement, consistent with The Prompt Report (arXiv:2406.06608) documenting CoT as one of 58+ validated techniques
- Negative constraints work better when paired with positive instructions. "Do not reproduce template headings without substantive content" should be paired with "each section must contain defensible prose before the next heading."
- The Fabric `extract_wisdom` pattern's use of minimum output counts per section is a more reliable specificity enforcement mechanism than negative constraints alone. Adapting this to Key Findings — requiring each finding to be ≥ 20 words — is the direct route to eliminating one-line vague findings
- A four-check shell quality gate detects the three primary failure modes at low false-positive cost: completed date populated, executive summary word count ≥ 80, ≥ 2 key findings with ≥ 15 words each, and ≥ 1 source marked ``
Research Question
How can the quality of research items produced by the research-loop.yml autonomous pipeline be systematically evaluated, and what changes to research-prompt.md and the loop's prompting strategy would produce higher-quality, deeper, more synthesis-rich research outputs?
Findings
Executive Summary
The quality variation in autonomous research loop output is prompt-caused, not model-caused: the model is capable of high-quality synthesis, and corpus evidence demonstrates this directly. The Research Skill Output section (§0–§7) added to research-prompt.md increased source engagement from 3.1 to 12.8 sources per item and key finding counts from 14 to 43, making it the single most impactful quality change to date. Three residual failure patterns persist in the pre-2026-03-03 corpus: sources listed but not consulted (40% of items), executive summaries that lack specific claims, and no cross-item integration with prior completed research — all three are addressable by five targeted additions to research-prompt.md. A four-check shell quality gate (completed date, ≥80-word executive summary, ≥2 substantive findings, ≥1 checked source) detects the most severe failures and can be implemented as a non-blocking GitHub Actions annotation step.
Key Findings
-
Items with the Research Skill Output section (§0–§7) produce dramatically better outputs: avg 12.8 sources checked vs. 3.1 without it, and avg 43 key findings vs. 14. The section is the most impactful quality lever already deployed. [high confidence]
-
40% of pre-2026-03-03 items have at least some sources listed but not consulted; 20% (4/20) have all sources unchecked. This is the primary source engagement failure and is prompt-caused: no explicit instruction existed to mark sources
[x]when consulted. [high confidence] -
The current
research-prompt.mdlacks an instruction to searchResearch/completed/for prior related work before starting a new item. As the corpus grows beyond 20 items this gap becomes a structural deficiency: each new item that ignores prior completed work duplicates effort and misses synthesis opportunities. [high confidence] -
Priority ordering in the loop is correct and respected in practice:
research-prompt.mdcontains explicitpriority: high → medium → lowrules, confirmed by both document inspection and observed execution order. No fix required. [high confidence] -
Chain-of-thought prompting in the form of structured step decomposition (§1 → §2 → §6) is the mechanism behind the Research Skill Output section's quality improvement, consistent with The Prompt Report (arXiv:2406.06608) documenting CoT as one of 58+ validated techniques. [high confidence]
-
Negative constraints work better when paired with positive instructions. "Do not reproduce template headings without substantive content" should be paired with "each section must contain defensible prose before the next heading." [medium confidence]
-
The Fabric
extract_wisdompattern's use of minimum output counts per section is a more reliable specificity enforcement mechanism than negative constraints alone. Adapting this to Key Findings — requiring each finding to be ≥ 20 words — is the direct route to eliminating one-line vague findings. [medium confidence] -
A four-check shell quality gate detects the three primary failure modes at low false-positive cost: completed date populated, executive summary word count ≥ 80, ≥ 2 key findings with ≥ 15 words each, and ≥ 1 source marked
[x]. [high confidence] -
The "Lost in the Middle" effect (arXiv:2307.03172) means critical instructions should be placed near the top of the relevant step in
research-prompt.md. The source-marking discipline instruction (addition 2) and prior-research cross-reference instruction (addition 1) must each appear as the first instruction in their respective steps to maximise compliance. [medium confidence] -
Fifteen items in
Research/completed/(pre-2026-03-03) have suboptimal source coverage due to the pre-Research Skill Output prompt. A targeted re-enrichment pass on the strategically most important items is a separate task worth adding to the backlog. [medium confidence]
Assumptions
- Assumption: The model follows the revised prompt's instructions at quality comparable to the 2026-03-03 items. Justification: The 2026-03-03 items demonstrate the model is capable of compliance with multi-step structured instructions; proposed additions are incremental extensions.
- Assumption: The structural quality gate's false-positive rate is acceptably low. Justification: Conservative thresholds (80 words, 2 findings, 1 checked source) — any genuine research effort produces outputs well above these minima.
Analysis
The corpus audit produces a clean before/after split at 2026-03-03. The Research Skill Output section addition was decisive; the proposed five additions are incremental refinements targeting the residual gaps it does not fully close. The most impactful addition is the prior research cross-reference instruction: it transforms the corpus from a collection of isolated items into a connected knowledge base, compounding in value as item count grows.
Prompt length management is straightforward: from ~800 to ~1,100 words, within the range where instruction-following remains reliable. The critical placement guidance (instructions near the top of their steps) mitigates the "Lost in the Middle" risk without restructuring the prompt.
The quality gate is designed as an informational signal initially. This avoids the risk of a conservative threshold blocking a legitimate item and stalling the loop. After calibration (confirming zero false positives across 5+ loop runs), it can be made blocking.
Risks, Gaps, and Uncertainties
- The source engagement improvement correlation with the Research Skill Output section may partly reflect that 2026-03-03 items had more internal (repository) sources than earlier items. The causal effect on web-source engagement cannot be cleanly isolated without a controlled experiment.
- The five proposed additions have not been tested against a live session. The recommended next step is a controlled test: run the revised prompt on one
medium-priority backlog item and compare against a pre-revision item of similar complexity. - The "Lost in the Middle" finding is from research on GPT-3.5/4 models. The Copilot CLI model may have different attention characteristics. Placement guidance is precautionary.
Open Questions
-
Structural cross-item integration check: Can a regex for
Research/completed/links in the Findings section serve as a proxy for cross-item integration without LLM reasoning? This would add a fifth check to the quality gate. Recommend adding as a stretch goal once the four-check gate is validated. [medium priority] -
Re-enrichment of pre-2026-03-03 items: Should the 15 suboptimal items in
Research/completed/be re-enriched with additional source coverage? This is a separate task requiring a new backlog item. High-value candidates:ai-line-1-line-2-risk-agents.md(0/10 sources checked, strategically relevant),ai-strategy-risk-reduction-focus.md(0/8 sources checked). [medium priority] -
Quality gate blocking vs. informational threshold: After how many loop runs with zero false positives should the quality gate become blocking? A proposed criterion: 5 consecutive passing runs before enabling the blocking mode. [low priority]
sources
- [x]
research-prompt.md— current prompt; the primary artefact to evaluate and revise - [x]
.github/workflows/research-loop.yml— loop implementation; understand item selection and session invocation - [x]
Research/completed/— existing loop-produced items; corpus for the quality audit - [x]
Research/completed/2026-03-01-github-specify-ralph-loop-lisa-planning.md— completed research on the Ralph Wiggum Technique, loop phases (Specify → Plan → Build), and proof-driven development; covers loop design (this item covers loop output quality and prompt improvement) - [x]
Research/backlog/2026-03-02-research-quality-assurance-methodology.md— complement to this item: quality review methodology (downstream quality checks vs. this item's upstream prompt improvements) - [x] Anthropic Prompt Engineering Guide — chain-of-thought, role prompting, negative constraints
- [ ] OpenAI Prompt Engineering Guide — structured output, decomposition patterns (JS-protected, inaccessible)
- [x] LMSYS / arXiv — The Prompt Report (arXiv:2406.06608): systematic survey of 58+ LLM prompting techniques (2024)
- [x] Fabric (Daniel Miessler) — prompt patterns for research extraction and synthesis; patterns like
extract_wisdom,summarize,create_report - [x]
docs-adr/0004-autonomous-research-loop.md— ADR for the loop; safety controls and design rationale