4 ms·
Cool! The DX is tricky to nail, when combined with LLM's tendency to hallucinate. I asked it to extract some text from an image, which it dutifully tried to do
by ed 3y ago
Cool! The DX is tricky to nail, when combined with LLM's tendency to hallucinate.
I asked it to extract some text from an image, which it dutifully tried to do. However the generated python kept throwing errors. There's no image -> text tool yet, so it was trying to use the image segmenter to generate a mask and somehow extract text from that.
It would be super helpful to:
1) Have a complete list of available tools (and / or a copy of the entire prompt given to the LLM responsible for generating python). I used prompt injection to get a partial list of tools and checked the Github agent PR for the rest, but couldn't find `<<all_tools>>` since it gets generated at runtime (I think?).
2) Tell the LLM it's okay to fail. E.g.: "Extract the text from image `image`. If you are unable to do this using the tools provided, say so." This prompt let me know there's no tool for text extraction.
Update: per https://huggingface.co/docs/transformers/custom_tools https://huggingface.co/docs/transformers/custom_tools you can output a full list of tools with `print(agent.toolbox)`