lavague-ai / LaVague

Large Action Model framework to develop AI Web Agents
https://docs.lavague.ai/en/latest/
Apache License 2.0
5.5k stars 506 forks source link

Retry when structured LLM output is invalid #502

Open adeprez opened 4 months ago

adeprez commented 4 months ago

When we expect some structured output and the LLM fails to generate it, we should retry a few times to give it a chance to succeed. For instance it happens for yaml action list generation.

lyie28 commented 4 months ago

I had this bug with this command:

lavague-test -c lavague-tests/contexts/anthropic_context.py -s nytimes.com

And also within the docs CI - when running:

python .github/extract-python-code.py docs/docs/use-cases/forms.md
python extracted_code_forms.py