haystack/releasenotes/notes/fix-recursive-json-schema-validator-cdb7684de3c75e4e.yaml
Corentin d158be40b3
fix(JsonSchemaValidator): fix recursive loop and general LLM (claude, mistral...) compatibility (#7556)
* Feat: Fix recursive conversion in JsonSchemaValidator (autofix generated by ClaudeOpus). Modify the behaviour to build the error template in a single user_message instead of two separate. Modify the behaviour to only include latest message instead of full history (very costly if long looping pipeline)

* Feat: Fix recursive conversion in JsonSchemaValidator (autofix generated by ClaudeOpus). Modify the behaviour to build the error template in a single user_message instead of two separate. Modify the behaviour to only include latest message instead of full history (very costly if long looping pipeline)

* reno

* fix test

* Verify provided message contains JSON object to begin with

* Minor detail

---------

Co-authored-by: Vladimir Blagojevic <dovlex@gmail.com>
2024-06-21 11:10:34 +02:00

9 lines
348 B
YAML

---
enhancements:
- |
Made JSON schema validator compatible with all LLM by switching error template handling to a single user message.
Also reduce cost by only including last error instead of full message history.
fixes:
- |
Fix recursive JSON type conversion in the schema validator to be less aggressive (no infinite recursion).