ReAct Agent Evaulation
I am following the below guides. I am first setting up the top_agent and then trying to build a rag_dataset with it. The problem is that it gets to a certain point and then gives me the below error message. Any ideas on how to resolve?
https://docs.llamaindex.ai/en/stable/examples/agent/multi_document_agents/https://docs.llamaindex.ai/en/stable/examples/evaluation/answer_and_context_relevancy/---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[17], line 1
----> 1 prediction_dataset = await qas.amake_predictions_with(
2 predictor=top_agent, batch_size=100, show_progress=True
3 )
File ~/anaconda3/envs/nat_gpu/lib/python3.11/site-packages/llama_index/core/agent/react/step.py:583, in ReActAgentWorker._arun_step(self, step, task)
579 reasoning_steps, is_done = await self._aprocess_actions(
580 task, tools, output=chat_response
581 )
582 task.extra_state["current_reasoning"].extend(reasoning_steps)
--> 583 agent_response = self._get_response(
584 task.extra_state["current_reasoning"], task.extra_state["sources"]
585 )
586 if is_done:
587 task.extra_state["new_memory"].put(
588 ChatMessage(content=agent_response.response, role=MessageRole.ASSISTANT)
589 )
File ~/anaconda3/envs/nat_gpu/lib/python3.11/site-packages/llama_index/core/agent/react/step.py:413, in ReActAgentWorker._get_response(self, current_reasoning, sources)
411 raise ValueError("No reasoning steps were taken.")
412 elif len(current_reasoning) == self._max_iterations:
--> 413 raise ValueError("Reached max iterations.")
415 if isinstance(current_reasoning[-1], ResponseReasoningStep):
416 response_step = cast(ResponseReasoningStep, current_reasoning[-1])
ValueError: Reached max iterations.