langchaingo icon indicating copy to clipboard operation
langchaingo copied to clipboard

using the mrkl agent with llama3

Open nilsherzig opened this issue 1 year ago • 1 comments

Hi, I think there is a problem with llama3 and the mrkl chain.

The following stop word overwrite results in llama3 generating random things since its stop words are ignored.

https://github.com/tmc/langchaingo/blob/8707e51a48a1a85e4d3086a644a92b146a1623d2/agents/mrkl.go#L89

(after the joke and its stop words, it starts to hallucinate)

image

without this overwrite:

image

nilsherzig avatar Apr 18 '24 21:04 nilsherzig

might be related to https://github.com/langchain-ai/langchain/pull/20624

(not the empty array thing, but it looks like llama3 might need some extra care)

nilsherzig avatar Apr 19 '24 06:04 nilsherzig