Building Custom Tools for LLM Agents


This is a companion discussion topic for the original entry at https://www.pinecone.io/learn/series/langchain/langchain-tools

Circumference tool was taking the action inout as a string instead of a json and we need to manually change the prompt to work.
Image captioning tool also when configured still returns output as a number.
We may need to update the code with the updated version to get the expected output. Please update

Hello @haripriya04raj ,

Thank you for pointing this out.

Just to confirm the issue, on the Circumference tool description, you had to update it to the following:

description = "use this tool when you need to calculate a circumference using the radius of a circle, input has to be a number"

For the Image captioning tool, I did not have to make any changes for it to work. In the screenshot, I see the output is text saying “there is a monkey that is sitting in a tree”


"