- π Hi, Iβm @TheScroll75
- π Iβm interested in ...
- π± Iβm currently learning ...
- ποΈ Iβm looking to collaborate on ...
- π« How to reach me ...
- π Pronouns: he ...
- β‘ Fun fact: I Like To Read ...
- πΆβπ«οΈ meanings to an End
- π delivery
from deepeval.tracing import observe, update_current_span from deepeval.test_case import LLMTestCase from deepeval.dataset import Golden from deepeval.metrics import GEval from deepeval import evaluate
correctness = GEval(name="Correctness", criteria="Determine if the 'actual output' is correct based on the 'expected output'.", evaluation_params=[LLMTestCaseParams.ACTUAL_OUTPUT, LLMTestCaseParams.EXPECTED_OUTPUT])
@observe(metrics=[correctness]) def inner_component(): # Component can be anything from an LLM call, retrieval, agent, tool use, etc. update_current_span(test_case=LLMTestCase(input="...", actual_output="...")) return
@observe def llm_app(input: str): inner_component() return
evaluate(observed_callback=llm_app, goldens=[Golden(input="Hi!")])