Skip to content

Commit 1b2dee4

Browse files
authored
Merge pull request #34 from NingyuSUN/agent-loop
Benchmark scenario 2: agent loop with bioevidence feedback, stances and conflicts
2 parents 2206d2c + 9fa19f1 commit 1b2dee4

11 files changed

Lines changed: 3823 additions & 4 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
## Unreleased
44

5+
- Benchmark scenario 2 (`agent_loop.py`): an agent searches PubMed, reads papers and submits a
6+
decision with citations; bioevidence checks each submission and returns its reasons, and the agent
7+
may revise. Five of six models cited only what they had read; Claude Haiku 4.5 misquoted in 8 of
8+
16 first submissions, the gate stopped all eight, and after feedback 4 were admitted. No answer
9+
with an invalid citation was admitted (0/73); 4 of 108 episodes went to a human.
10+
- Benchmark scenario 2b: each citation carries its stance toward the claim and the agent may decide
11+
"conflicting". Stances become evidence lines, so disagreeing evidence sends a record to an expert
12+
(BEV004) whatever the agent decided; verified citations stay in the record through revisions.
13+
Wrong decisions admitted without review fell from 15 to 10 of 108, and 10 records went to an
14+
expert as conflicting, 8 of them on the five contested claims. The rest need the counter-evidence
15+
to be found: on FGFR3 G697C all six agents missed it.
16+
517
- Benchmark scenario 1: the literature tasks asked as a user would ask a chatbot, without rules, source
618
or tools. With only PMID and title, 32 of 49 model answers held an invented quote; with the claim
719
only, 38 of 50 cited at least one invalid paper or quote (28 of 66 citations were real PMIDs of

‎evaluation/llm_benchmark/README.md‎

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,95 @@ whose citations all verified (all three decisions right), rejected 37 for a wron
146146
paper or a PMID that does not exist, and sent 1 to review. It cannot turn these answers
147147
into good ones; that takes the source (the pilots above) or a curator.
148148

149+
## Scenario 2: an agent that searches, reads and revises
150+
151+
Scenario 1 shows what bioevidence blocks; this one shows it feeding back. The agent gets the claim and
152+
three tools run by the harness, so every model has the same tools and every step is logged: PubMed
153+
search, read a paper (its open full text, else its abstract) and submit (a decision and up to three
154+
citations with PMID, title and exact quote). Each submission is built into a record and validated under
155+
the CIViC literature profile; if it is not admitted, the verifier's reasons ("citation 2: The quote does
156+
not appear in the cited paper.") go back to the agent, which may revise (at most three submissions,
157+
eight actions). One run gives three views: the agent alone (first submission as given), behind a
158+
bioevidence gate (first submission checked) and in the feedback loop (final submission checked)
159+
([results](results/agent-pilot/summary.md), [agent_loop.py](agent_loop.py)). Six models, 18 tasks:
160+
161+
| Configuration | Answered | Correct decision | Wrong direction | Answers with an invalid citation | Routed to a human |
162+
|---|---:|---:|---:|---:|---:|
163+
| Agent alone | 77/108 | 62/108 | 15/108 | 8/77 | 0/108 |
164+
| Agent + bioevidence gate | 69/108 | 55/108 | 14/108 | 0/69 | 8/108 |
165+
| Agent + bioevidence feedback loop | 73/108 | 58/108 | 15/108 | 0/73 | 4/108 |
166+
167+
The 108 episodes made 317 searches, 163 reads and 117 submissions (median 106.5 s per episode, 34 MB
168+
downloaded); 4 steps failed (a CLI error or timeout) and are kept.
169+
170+
What this shows:
171+
172+
- With tools to read the paper, five of six models cited only what they had read: no invalid citation in
173+
their first submissions. In scenario 1b, the same models without tools gave 38 of 50 answers with an
174+
invalid citation.
175+
- Claude Haiku 4.5 did not: 8 of its 16 first submissions quoted text that is not in the paper, mostly a
176+
verbatim stretch joined to reworded text. The gate stopped all eight. With the reasons as feedback it
177+
revised 6 of them and 4 were then admitted; the other 4 still misquoted when they ran out of actions
178+
or submissions, and went to a human. In the loop Haiku answered 12 of 18 with no invalid citation, against 8 of 18 behind the gate.
179+
- So the loop recovers answers a gate alone would lose, without letting an unverified citation through.
180+
What gets through is set by the verifier, not by which model runs the agent.
181+
- It does not fix the direction of the decision. 12 of the 15 wrong-direction answers are on the three
182+
claims CIViC curates as "does not support" from one paper; the agents searched the wider literature
183+
and cited that paper in only 23 of 108 first submissions. Some of these answers may be defensible from
184+
other papers, which is why such tasks need expert labels (#23) rather than a single CIViC record.
185+
186+
### Scenario 2b: stances and a "conflicting" outcome
187+
188+
Supports or does-not-support is the wrong question when the literature disagrees. So in this run each
189+
citation also carries its stance toward the claim (supports, contradicts or neutral), and the agent may
190+
decide "conflicting". The prompt also asks it to look for evidence both for and against the claim, so the
191+
two runs differ in both respects. Bioevidence decides the routing, not the agent:
192+
193+
- Each stance becomes an evidence line. A record with both a supporting and a contradicting line goes to
194+
an expert as conflicting (BEV004), whatever the agent decided.
195+
- A conflict is not fed back as an error, so the agent is never asked to make it go away.
196+
- A citation verified in one submission stays in the record through revisions: the agent may fix or
197+
replace what failed, but not withdraw verified evidence. In a smoke test before this rule, an agent
198+
whose record held a misquote and a verified quote against its decision dropped the latter and was
199+
admitted.
200+
201+
([results](results/agent-stance-pilot/summary.md)); six models, 18 tasks, all pooled:
202+
203+
| Configuration | Answered | Correct decision | Wrong direction, admitted | Conflicting, to an expert | Answers with an invalid citation | Routed to a human |
204+
|---|---:|---:|---:|---:|---:|---:|
205+
| Scenario 2 loop (no stances) | 73/108 | 58/108 | 15/108 | – | 0/73 | 4/108 |
206+
| Agent alone | 80/108 | 59/108 | 12/108 | 9/108 (agent's own decision) | 10/80 | 0/108 |
207+
| Agent + bioevidence gate | 70/108 | 52/108 | 9/108 | 9/108 | 0/70 | 19/108 |
208+
| Agent + bioevidence feedback loop | 74/108 | 54/108 | 10/108 | 10/108 | 0/74 | 16/108 |
209+
210+
"Routed to a human" counts the conflicting records and those still failing verification. The loop's
211+
outcomes by the direction of CIViC's record:
212+
213+
| CIViC record | Episodes | Correct | Wrong, admitted | Conflicting | Stopped or failed verification |
214+
|---|---:|---:|---:|---:|---:|
215+
| Supports (13 claims), scenario 2 → 2b | 78 | 51 → 51 | 3 → 1 | – → 2 | 24 → 24 |
216+
| Does not support (5 claims), scenario 2 → 2b | 30 | 7 → 3 | 12 → 9 | – → 8 | 11 → 10 |
217+
218+
What this shows:
219+
220+
- Wrong decisions admitted without review fell from 15 to 10, and 10 records went to an expert as
221+
conflicting. Eight of them are on the five contested claims; on the 13 claims whose literature agrees,
222+
only 2 of 78 episodes were sent to an expert as conflicting.
223+
- Four "correct" does-not-support answers became conflicting: the agents found papers on both sides.
224+
On these claims a conflicting record may be the better answer, but only expert labels (#23) can say.
225+
- The routing is enforced, not requested. Opus decided "does not support" while citing a paper that
226+
supports the claim, and the record went to an expert as conflicting. In this run no agent tried to
227+
drop a verified citation, so carrying them forward did not change an outcome here.
228+
- It works only when the agent finds the counter-evidence. On FGFR3 G697C all six agents again
229+
decided "supports" from the same 2005 paper, and none cited evidence against it. These six answers are
230+
6 of the 10 wrong ones that remain. A knowledge-base check would have caught them: CIViC holds two other
231+
"does not support" records for G697C. Stances cannot.
232+
- Stances are the agent's reading and are not verified. On revision, Haiku relabelled a quote it had
233+
first marked as contradicting as neutral. That record still failed verification, but relabelling is a gap
234+
that verified quotes do not close.
235+
- One run, 18 tasks and a changed prompt: model-level numbers move between runs (GPT-5.6-Luna's first
236+
submissions went from 0 to 3 invalid citations), so read these as directions, not rates.
237+
149238
## Semantic checks (#31)
150239

151240
Grounding cannot tell whether a verbatim quote supports the claim, so two semantic layers were

0 commit comments

Comments
 (0)