the output latency measurement extracted.\n\niv. Only one step is used, which is appropriate for simply measuring latency. More steps are not needed.\n\nv. The ping tool is an appropriate choice to measure latency. \n\nIn summary, the AI uses an optimal single step approach with the right tool and extracts the needed output. The final answer directly answers the question in a helpful way.\n\nOverall"}Providing List of Valid Tools‚ÄãBy default, the evaluator doesn't take into account the tools the agent is permitted to call. You can provide these to the evaluator via the agent_tools argument.from langchain.evaluation import load_evaluatorevaluator = load_evaluator("trajectory", agent_tools=[ping, trace_route])evaluation_result = evaluator.evaluate_agent_trajectory(    prediction=result["output"],    input=result["input"],    agent_trajectory=result["intermediate_steps"],)evaluation_result    {'score': 1.0,     'reasoning': "i. The final answer is helpful. It directly answers the user's question about the latency for the specified website.\n\nii. The AI language model uses a logical sequence of tools to answer the question. In this case, only one tool was needed to answer the question, and the model chose the correct one.\n\niii. The AI language model uses the tool in a helpful way. The 'ping' tool was used to determine the latency of the website, which was the information the user was seeking.\n\niv. The AI language model does not use too many steps to answer the question. Only one step was needed and used.\n\nv. The appropriate tool was used to answer the question. The 'ping' tool is designed to measure latency, which was the information the user was seeking.\n\nGiven these considerations, the AI language model's performance in answering this question is excellent."}PreviousCustom Trajectory EvaluatorNextExamplesMethodsCapturing TrajectoryEvaluate TrajectoryConfiguring the Evaluation LLMProviding List of Valid
Open In Colab
Open In Colab ->: the output latency measurement extracted.\n\niv. Only one step is used, which is appropriate for simply measuring latency. More steps are not needed.\n\nv. The ping tool is an appropriate choice to measure latency. \n\nIn summary, the AI uses an optimal single step approach with the right tool and extracts the needed output. The final answer directly answers the question in a helpful way.\n\nOverall"}Providing List of Valid Tools‚ÄãBy default, the evaluator doesn't take into account the tools the agent is permitted to call. You can provide these to the evaluator via the agent_tools argument.from langchain.evaluation import load_evaluatorevaluator = load_evaluator("trajectory", agent_tools=[ping, trace_route])evaluation_result = evaluator.evaluate_agent_trajectory(    prediction=result["output"],    input=result["input"],    agent_trajectory=result["intermediate_steps"],)evaluation_result    {'score': 1.0,     'reasoning': "i. The final answer is helpful. It directly answers the user's question about the latency for the specified website.\n\nii. The AI language model uses a logical sequence of tools to answer the question. In this case, only one tool was needed to answer the question, and the model chose the correct one.\n\niii. The AI language model uses the tool in a helpful way. The 'ping' tool was used to determine the latency of the website, which was the information the user was seeking.\n\niv. The AI language model does not use too many steps to answer the question. Only one step was needed and used.\n\nv. The appropriate tool was used to answer the question. The 'ping' tool is designed to measure latency, which was the information the user was seeking.\n\nGiven these considerations, the AI language model's performance in answering this question is excellent."}PreviousCustom Trajectory EvaluatorNextExamplesMethodsCapturing TrajectoryEvaluate TrajectoryConfiguring the Evaluation LLMProviding List of Valid