Accessing Experiment Explanations via API for Evaluation Reports
After running experiments with provide_explanation=True, can I access the explanation via API or method, so that I can create an evaluation report of the experiments with explanations and send to other teams. Thanks Evaluation example:
def evaluate_clarity(input, output, expected) -> bool:
if output is None:
return False
df = pd.DataFrame(
{
"query": [input.get("question")],
"response": [output.get("final_output")],
}
)
response = llm_classify(
data=df,
template=CLARITY_LLM_JUDGE_PROMPT,
rails=["clear", "unclear"],
model=eval_model,
provide_explanation=True,
)
print(response["explanation"]) # here explanation exists
return response["label"] == "clear"