Version: latest
agrag.eval.answer.answer_case
answer_case(question:str, result:AgentRunResult, reference:str) -> LLMTestCase
Build the test case that every answer-quality metric scores.
retrieval_context holds the fetched evidence. metadata["citations"]
maps each evidence id to its text for CitationAccuracyMetric.
Parameters:
- question (
str) – The question the agent answered. - result (
AgentRunResult) – The result ofagent.ainvokefor that question. - reference (
str) – The reference answer.
Returns:
LLMTestCase– The test case with the answer and rendered evidence.