Find answers from the community

Updated 2 months ago

Llama tool

Hi, I'm testing llama integration(as a tool), and instead of answering my question, it comes up with a new question(based on stored document) which I haven't asked and answers to that. Did anyone have the same issue?
L
l
5 comments
You are using llama index with langchain?

I know that with langchain, the LLM decides what it needs to ask the tool (rather than repeating the question directly)

You can control this a little bit with the tool description
yes, sorry should have said "langchain integration". Yeah it's strange, the initial question was "who is a person x)" and the observation generated by the tool included a question which was "what was the purpose of the person x ". And the final answer was the answer to that too. I thought langchain tools may come up with different questions but the final answered would be consistent with the main question. Thanks for the reply, I'll investigate more.
Do you have return_direct=True set for the tool?

You can try setting that to false so that the LLM has a chance to re-word its answer like you said. But sometimes it can also decide to use the tool again and again lol
hmm, yes it was set in llama-index example notebook. Changed it to False and it seems to fix it at least for now, thanks! But strangely cant find the return_direct description in docs yet πŸ˜„
Add a reply
Sign up and join the conversation on Discord