research-prompt: add AUTONOMY CONTRACT + relax citation rigidity
Inspection of a stuck 500s+ research run showed both agents were
correctly picking up the topic AND producing rich, structured plans —
then stalling at 'Should I proceed?' and 'Which approach?'. No human
to answer = infinite spin until stale-sweep + retry, forever.
Two prompt changes to compose_research_iteration_task:
1. AUTONOMY CONTRACT at the top:
- Explicit "no human will answer you"
- Explicit "do NOT ask for confirmation"
- Explicit "you MUST emit the completed artifact"
- Framed as a contract, at the very top, before the task itself.
2. Softer citation rule:
- Was: 'Cite every claim; never fabricate sources or repo paths.'
- Now: 'Cite what you can verify. Use [claim needs verification]
inline when you can't. A written v(N) with rough citations
beats a blocked v(N) waiting for approval. Do not fabricate
concrete titles/authors/DOIs.'
The absolute anti-fabrication rule made agents refuse to write
anything unless they could be sure. Coupled with no user available,
the whole loop stalled — turns completed successfully but no output
converged.
Follow-up if this repeats:
- Even shorter prompt (the current one is 300+ words)
- Explicit output-shape enforcement ('respond with only the markdown
artifact, no preamble')
- Cap iteration count so a broken prompt doesn't burn tokens forever
This commit is contained in:
@@ -156,6 +156,12 @@ pub async fn compose_research_iteration_task(
|
||||
Outcome kind: {outcome_kind}\n\
|
||||
Prior artifact version: v{prior_version} (0 = fresh)\n\n\
|
||||
DESCRIPTION:\n{description}\n\n\
|
||||
AUTONOMY CONTRACT (READ FIRST):\n\
|
||||
- This is a scheduled autonomous run. NO HUMAN WILL ANSWER YOU.\n\
|
||||
- Do NOT ask 'Should I proceed?' or 'Which approach?' — proceed with\n\
|
||||
your best judgment and produce the artifact.\n\
|
||||
- You MUST emit the completed artifact as your final message.\n\
|
||||
Failure to emit = the entire loop iteration is wasted.\n\n\
|
||||
YOUR JOB THIS ITERATION:\n\
|
||||
- Refresh the research — pull in any new papers / findings since v{prior_version}.\n\
|
||||
- Update the artifact using the SAME section structure the outcome_kind\n\
|
||||
@@ -164,10 +170,18 @@ pub async fn compose_research_iteration_task(
|
||||
is superseded, mark it {{deprecated: <reason>}} rather than deleting so\n\
|
||||
downstream coding loops that already consumed it don't lose context.\n\
|
||||
- Add NEW items with new ids continuing from the last used number.\n\
|
||||
- Cite every claim; never fabricate sources or repo paths.\n\n\
|
||||
- Cite what you can verify. When you can't cite a specific paper or\n\
|
||||
benchmark, write `[claim needs verification]` inline and MOVE ON — do\n\
|
||||
not stall the loop asking a human for permission. The next iteration\n\
|
||||
can strengthen citations; a written v{} with rough citations beats a\n\
|
||||
blocked v{} waiting for approval.\n\
|
||||
- Do NOT fabricate concrete paper titles, author names, or DOIs.\n\
|
||||
Vague-but-honest ('a 2024 HNSW improvement paper') beats invented specifics.\n\n\
|
||||
The workspace's final synthesis is captured as research_outcomes v{}. \
|
||||
Downstream on_artifact_update loops will wake up on this write.\n\n\
|
||||
LOOP OPERATOR NOTES:\n{task_template}\n",
|
||||
prior_version + 1,
|
||||
prior_version + 1,
|
||||
prior_version + 1
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user