Claus Ibsen created CAMEL-26758:
-----------------------------------

             Summary: camel-jbang - AI tools: the third identical refused write 
gets the fix that the refusal gave
                 Key: CAMEL-26758
                 URL: https://issues.apache.org/jira/browse/CAMEL-26758
             Project: Camel
          Issue Type: Improvement
          Components: camel-jbang, camel-yaml-dsl
            Reporter: Claus Ibsen
            Assignee: Claus Ibsen
             Fix For: 4.24.0


Follow-up from the local-model benchmark (qwen3.6, r28 to r30). A model 
sometimes sends the same refused file again and again, also when the refusal 
gives the exact lines to write. In r28 to r30 this happened in 23 step runs: 13 
of the 14 runs with 4 or more sends failed, and all 9 runs with 8 or more sends 
failed. Repairs per mistake (CAMEL-25532, CAMEL-26730) help, but the loop then 
moves to the next mistake: contracts-rest-code-first step 1 looped on a 
concatenation and an extra quote (r28), on the literal \n (r29), and on a 
jsonpath with [] (r30, 15 times in two runs).
* When the write tool refuses the same content of a file for the third time in 
a row, it now makes the fix that the refusal gave as exact text ("Write lines 
A-B as:" with the lines, or "write the line as ..."), runs the repairs of 
shapes with one reading, and writes the file when no new problem is left. The 
answer lists what changed. This happens only when every problem of the write 
has such text; otherwise the write is refused as before. Not for Citrus tests.
* The jsonpath message for [] gives the line to write, and the message for an 
unclosed double quote ends with the line to write, so the write tool can apply 
both.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to