OutputParserException: Could not parse LLM output
Labels: name: area: agent, name: auto:bug, name: integration: chroma

### System Info

Doing experiment on google collab

using llam2 7b quantized model


below is my code

agent with memory & i tried   A gentExecutor

```

source_text_tool = Tool(
    name="The Prophet Source Text QA System",
    func=prophet_qa_chain.run,
    description="Useful when asked question related to philosophy or The Prophet."
)

analysis_text_tool = Tool(
    name="Other philosophy QA System",
    func=analysis_qa_chain.run,
    description="Useful when asked questions related to philosophy or Stoicism or Sikhs"
)


prefix = """
You're having a conversation with a human. You're helpful and answering
questions to your maximum ability.You have access to the following tools:
"""

suffix = """Let's Go!"
{chat_history}
Question: {input}

{agent_scratchpad}
"""


tools = [source_text_tool, analysis_text_tool]



prompt = ZeroShotAgent.create_prompt(tools,
                                     prefix=prefix,
                                     suffix=suffix,
                                     input_variables=["input", "chat_history","agent_scratchpad"])  #{chat_history}

memory = ConversationBufferMemory(memory_key="chat_history")


llm_chain = LLMChain(llm=load_llm(),
                     prompt=prompt)

agent = ZeroShotAgent(llm_chain=llm_chain,
                      tools=tools,
                      verbose=True)

agent_chain_memory = AgentExecutor.from_agent_and_tools(
    agent=agent,
    tools=tools,
    memory=memory, #its without memo
    verbose=True
)
```



error i im getting
```
> Entering new AgentExecutor chain...
---------------------------------------------------------------------------
OutputParserException                     Traceback (most recent call last)
[<ipython-input-31-a44cd2d0a1a6>](https://localhost:8080/#) in <cell line: 1>()
----> 1 agent_chain_memory.run(input="How should I handle my fear of death ?")

7 frames
[/usr/local/lib/python3.10/dist-packages/langchain/agents/mrkl/output_parser.py](https://localhost:8080/#) in parse(self, text)
     50 
     51         if not re.search(r"Action\s*\d*\s*:[\s]*(.*?)", text, re.DOTALL):
---> 52             raise OutputParserException(
     53                 f"Could not parse LLM output: `{text}`",
     54                 observation=MISSING_ACTION_AFTER_THOUGHT_ERROR_MESSAGE,

OutputParserException: Could not parse LLM output: `*Thought:* "I will take a deep breath and reflect on the nature of mortality, considering both the transience of life and the certainty of death."

*Action Input:* Choose one of the following options:
A) Seek guidance from The Prophet Muhammad's teachings on the afterlife.
B) Explore Stoicism or Sikh philosophy for coping mechanisms.
C) Utilize a QA system specifically designed to address questions related to philosophy and death.
*Observation:* The action taken will determine the final answer provided.`

```

### Who can help?

@hwchase17 @agola11 

### Information

- [ ] The official example notebooks/scripts
- [X] My own modified scripts

### Related Components

- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [X] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

```


# i used documents to store embedding in chromdadb & using below data

analysis_qa_chain = RetrievalQA.from_chain_type(
    llm=load_llm(),
    chain_type="map_reduce",
    retriever=web_db.as_retriever()
)

prophet_qa_chain = RetrievalQA.from_chain_type(
    llm=load_llm(),
    chain_type="map_reduce",
    retriever=prophet_db.as_retriever()
)

source_text_tool = Tool(
    name="The Prophet Source Text QA System",
    func=prophet_qa_chain.run,
    description="Useful when asked question related to philosophy or The Prophet."
)

analysis_text_tool = Tool(
    name="Other philosophy QA System",
    func=analysis_qa_chain.run,
    description="Useful when asked questions related to philosophy or Stoicism or Sikhs"
)


prefix = """
You're having a conversation with a human. You're helpful and answering
questions to your maximum ability.You have access to the following tools:
"""

suffix = """Let's Go!"
{chat_history}
Question: {input}

{agent_scratchpad}
"""
tools = [source_text_tool, analysis_text_tool]



prompt = ZeroShotAgent.create_prompt(tools,
                                     prefix=prefix,
                                     suffix=suffix,
                                     input_variables=["input", "chat_history","agent_scratchpad"])  #{chat_history}

memory = ConversationBufferMemory(memory_key="chat_history")


llm_chain = LLMChain(llm=load_llm(),
                     prompt=prompt)

agent = ZeroShotAgent(llm_chain=llm_chain,
                      tools=tools,
                      verbose=True)

agent_chain_memory = AgentExecutor.from_agent_and_tools(
    agent=agent,
    tools=tools,
    memory=memory, #its without memo
    verbose=True
)

```
```
agent_chain_memory.run(input="How should I handle my fear of death ?")

```

### Expected behavior

im getting op but error also coming with this

```
> Entering new AgentExecutor chain...
---------------------------------------------------------------------------
OutputParserException                     Traceback (most recent call last)
[<ipython-input-31-a44cd2d0a1a6>](https://localhost:8080/#) in <cell line: 1>()
----> 1 agent_chain_memory.run(input="How should I handle my fear of death ?")

7 frames
[/usr/local/lib/python3.10/dist-packages/langchain/agents/mrkl/output_parser.py](https://localhost:8080/#) in parse(self, text)
     50 
     51         if not re.search(r"Action\s*\d*\s*:[\s]*(.*?)", text, re.DOTALL):
---> 52             raise OutputParserException(
     53                 f"Could not parse LLM output: `{text}`",
     54                 observation=MISSING_ACTION_AFTER_THOUGHT_ERROR_MESSAGE,

OutputParserException: Could not parse LLM output: `*Thought:* "I will take a deep breath and reflect on the nature of mortality, considering both the transience of life and the certainty of death."

*Action Input:* Choose one of the following options:
A) Seek guidance from The Prophet Muhammad's teachings on the afterlife.
B) Explore Stoicism or Sikh philosophy for coping mechanisms.
C) Utilize a QA system specifically designed to address questions related to philosophy and death.
*Observation:* The action taken will determine the final answer provided.`


```