## TL;DR

Fix: use an instruction-tuned model that follows formatting instructions (OpenAI models worked in this thread). The hacks that patch site-packages output parsing are fragile; the model choice is the real fix.

## Steps

1. 'Could not parse LLM output' from a LangChain agent almost always means the model isn't following the ReAct format: models like google/flan-t5-xl or Bloom don't reliably produce the Thought / Action / Action Input structure the parser expects. Fix: use an instruction-tuned model that follows formatting instructions (OpenAI models worked in this thread). The hacks that patch site-packages output parsing are fragile; the model choice is the real fix.

## When to use

You are seeing this: https://github.com/langchain-ai/langchain/issues/1358: Issue langchain-ai/langchain#1358 (closed, 82 comments): agent\_chain = initialize\_agent( tools=tools, llm= HuggingFaceHub(repo\_id="google/flan-t5-xl"), agent="conversational-react-description",... Use this skill when you run into "ValueError: Could not parse LLM output:".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

## Sources

- https://github.com/langchain-ai/langchain/issues/1358:
