Opik Tutorial: Trace and Evaluate LLMs, Plus What It Misses
Opik tutorial: install Comet's open-source LLM tracing and evaluation platform, trace calls with @opik.track, score a dataset, and see what it can't test. Opik (Comet, Apache-2.0) traces your LLM calls and scores them with heuristic and LLM-as-a-judge metrics. In about 90 seconds: pip install + opik configure, the @opik.track decorator with thread_id, an evaluate() run with Equals on a dataset, and the threshold check in your own script that turns a low score into a failing CI job (evaluate() scores; your sys.exit fails the job). Then the gap, from Opik's own docs: your eval calls your code, so a deployed agent in another service and voice or phone channels sit outside it. In the video, the dataset eval for "What is your return window?" passes with "30 days", while the deployed bot answers the same question "60 days" against a 30-day policy. Agent Testing from TestMu AI (formerly LambdaTest) runs simulated customers against that live bot and returns a Red verdict with the failing turn linked, and CI blocks on Red. It doesn't replace evals; use both. Chapters 00:00 Every eval passed, the live bot said 60 days · What is Opik 00:14 Step 1: set up · Step 2: trace with @opik.track 00:28 Step 3: evaluate + the threshold check that fails CI 00:42 What Opik doesn't test: your eval called your code 00:57 Step 4: test the live agent (Red verdict) · use both 01:14 Start Agent Testing from CI Code shown pip install opik opik configure @opik.track + opik_context.update_current_trace(thread_id=conversation_id, tags=["support-bot"]) evaluate(dataset=dataset, task=task, scoring_metrics=[Equals()], scoring_key_mapping={"reference": "expected_output"}, experiment_name="baseline") your wrapper: if mean min_mean → failed; if failures: sys.exit(...) (from the guide's script) pip install agent-testing-cli agent-testing-cli --project "$TESTMU_PROJECT_ID" --json run --workflow "$TESTMU_WORKFLOW_ID" --suite "$TESTMU_SUITE_ID" --yes agent-testing-cli results --suite "$TESTMU_SUITE_ID" Opik facts (license, pricing, metrics, judge default GPT-5-nano, multi-turn limits) checked on Comet's GitHub, docs and product page as of Dec 5, 2026; plan limits change. Full guide (pricing table, metric list, multi-turn tests, Opik vs Langfuse): https://www.testmuai.com/blog/opik/ Agent Testing: https://www.testmuai.com/agent-testing/ Agent Testing CLI docs: https://www.testmuai.com/support/docs/agent-testing-cli/ #Opik #LLMEvaluation #AIAgents




Join the discussion
Have something to add?
Sign in to reply, follow this thread, and earn XP when your answer helps someone.