diff --git a/docs/howtos/customizations/_run_config.md b/docs/howtos/customizations/_run_config.md index b0c66c140a..dd7a9e3475 100644 --- a/docs/howtos/customizations/_run_config.md +++ b/docs/howtos/customizations/_run_config.md @@ -1,6 +1,6 @@ -# RunConfig +# Customize timeouts and rate limits -The `RunConfig` allows you to pass in the run parameters to functions like `evaluate()` and `TestsetGenerator.generate()`. Depending on your LLM providers rate limits, SLAs and traffic, controlling these parameters can improve the speed and reliablility of Ragas runs. +The `RunConfig` allows you to pass in the run parameters to functions like `evaluate()` and `TestsetGenerator.generate()`. Depending on your LLM providers rate limits, SLAs and traffic, controlling these parameters can improve the speed and reliability and set failure tolerance of Ragas runs. How to configure the `RunConfig` in diff --git a/src/ragas/callbacks.py b/src/ragas/callbacks.py index cbfb92b95f..d587e43a41 100644 --- a/src/ragas/callbacks.py +++ b/src/ragas/callbacks.py @@ -162,9 +162,11 @@ def parse_run_traces( prompt_traces = {} for i, prompt_uuid in enumerate(metric_trace.children): prompt_trace = traces[prompt_uuid] + output = prompt_trace.outputs.get("output", {}) + output = output[0] if isinstance(output, list) else output prompt_traces[f"{prompt_trace.name}"] = { "input": prompt_trace.inputs.get("data", {}), - "output": prompt_trace.outputs.get("output", {})[0], + "output": output, } metric_traces[f"{metric_trace.name}"] = prompt_traces parased_traces.append(metric_traces)