Troubleshooting ValueError in Evaluating DataFrames with LlamaIndex
Hey all! Sorry this is a very basic question but I'm working through the quickstart evals
# Define evaluators
qa_evaluator = QAEvaluator(eval_model)
# Prepare sample data for evaluations
queries_df = pd.read_csv("./phoenix/data.csv")
# Run the evaluations
qa_eval_df = run_evals(
dataframe=queries_df,
evaluators=[qa_evaluator],
provide_explanation=True
)
# Log the evaluations
from phoenix.trace import SpanEvaluations
px.Client(endpoint="http://127.0.0.1:6006").log_evaluations(
SpanEvaluations(eval_name="QA Correctness", dataframe=qa_eval_df[0])
)
I created a df manually by capturing the intermediates for my retriever in LlamaIndex, and I have what appeared to be the required fields input, output, reference but when I run my eval script I get
ValueError: The dataframe index must be ['context.span_id'] but was '[None]'I am assuming this is because I'm supposed to import spans as a df rather than manually create them, but not quite sure if I need to pivot and try to grab the traces instead
