From c65efd2986847e26836c04d42bd5072f62cf5c87 Mon Sep 17 00:00:00 2001 From: Harrison Chase Date: Thu, 29 Dec 2022 08:20:55 -0500 Subject: [PATCH] fix llm math prompt (#466) basically, it didnt realize that the question was over after the input and would some times hallucinate more input --- langchain/chains/llm_math/prompt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/langchain/chains/llm_math/prompt.py b/langchain/chains/llm_math/prompt.py index 252ec49301..05b7069829 100644 --- a/langchain/chains/llm_math/prompt.py +++ b/langchain/chains/llm_math/prompt.py @@ -33,6 +33,7 @@ print(37593 * 67) ``` Answer: 2518731 -Question: {question}""" +Question: {question} +""" PROMPT = PromptTemplate(input_variables=["question"], template=_PROMPT_TEMPLATE)