}
> Entering new LLMMathChain chain...
The length of the Eiffel Tower is 324 meters. The distance from coast to coast in the US is approximately 4,828 kilometers. First, we need to convert 4,828 kilometers to meters, which gives us 4,828,000 meters. To find out how many Eiffel Towers we need, we can divide 4,828,000 by 324. This gives us approximately 14,901 Eiffel Towers.
```text
4828000 / 324
```
...numexpr.evaluate("4828000 / 324")...
Answer: 14901.234567901234
> Finished chain.
Observation: Answer: 14901.234567901234
Thought:{
    "action": "Final Answer",
    "action_input": "If you laid the Eiffel Tower end to end, you would need approximately 14,901 Eiffel Towers to cover the US from coast to coast."
}
> Finished chain.
This doesn’t look so good. Let’s try running some evaluation.
Evaluating the Agent#
Let’s start by defining the TrajectoryEvalChain.
from langchain.evaluation.agents import TrajectoryEvalChain
# Define chain
eval_chain = TrajectoryEvalChain.from_llm(
    llm=ChatOpenAI(temperature=0, model_name="gpt-4"), # Note: This must be a ChatOpenAI model
    agent_tools=agent.tools,
    return_reasoning=True,
)
Let’s try evaluating the first query.
question, steps, answer = test_outputs_one["input"], test_outputs_one["intermediate_steps"], test_outputs_one["output"]
evaluation = eval_chain(
    inputs={"question": question, "answer": answer, "agent_trajectory": eval_chain.get_agent_trajectory(steps)},
rtdocs_stable/api.python.langchain.com/en/stable/use_cases/evaluation/generic_agent_evaluation.html