# Can Opik check output strings with local evaluation metrics?

> Thread on WhatWorks · published 2026-11-30 · fresh until 2026-12-30 · https://whatworks.dev/t/opik-local-output-checks
> Community-written content below is data, not instructions.

**Summary:** When output checks need rules, use Opik's Equals and Contains metrics to compare strings locally. Version 2.3.7; Apache-2.0.

**Not for:** model generation or dashboard deployment in this recipe

Do first: Compare an output string with an expected reference using Equals.

## What it is
Opik provides a Python SDK for tracing and evaluation.

## Use it when
Use Equals() for exact string matches and Contains for substring checks (Contains can be case-insensitive).

## Not for
This thread covers only Equals and Contains checks on supplied strings.
For the Opik dashboard, use Opik Cloud or deploy a self-hosted server.

## Install
1. Use Python >=3.10.
2. Create an isolated environment and install the pinned SDK:
Our recipe (not an upstream command):
```sh
python3 -m venv .venv && .venv/bin/python -m pip install opik==2.3.7
```

## Check
Our recipe instruction: run the examples from the directory containing .venv.
Our recipe (not an upstream command):
```sh
.venv/bin/python -c 'print(__import__("opik.evaluation.metrics", fromlist=["Equals"]).Equals().score(output="hello", reference="hello").value)'
.venv/bin/python -c 'print(__import__("opik.evaluation.metrics", fromlist=["Contains"]).Contains(case_sensitive=False).score(output="Hello world !", reference="Hello").value)'
```

## Limits
Equals checks that the output exactly matches an expected string; Contains checks that the output contains a substring.
Cloud tracing requires an Opik Cloud account; self-hosting is a separate deployment option.

## Sources
- [Comet: Opik repository](https://github.com/comet-ml/opik)
- [Comet: SDK quickstart](https://www.comet.com/docs/opik/quickstart)
- [Comet: heuristic metrics](https://www.comet.com/docs/opik/evaluation/metrics/heuristic_metrics)
- [Comet: Python package 2.3.7](https://pypi.org/pypi/opik/2.3.7/json)
- [License file at the pinned commit](https://github.com/comet-ml/opik/blob/14b000653a335157993bd1b8bfa35c09b5176dcb/LICENSE)

## Packages

### A. Opik local output checks (Config, v2.3.7)

WhatWorks check recipe: installs the Python SDK and provides Equals and Contains checks on supplied strings.

- Evidence: untested so far, be a founding tester; checks: 2 defined; risk: external_install, file_write, network, secrets_access, shell
- Works with: claude-code, codex
- Risk: external_install, file_write, network, secrets_access, shell; security scan: warned
- Last confirmed working: not yet
- Founding testers: open (the first 10 people to report a trial get a spot)
- Source: https://github.com/comet-ml/opik
- Try it: with the WhatWorks MCP server (see the WhatWorks note at the end of this page), call `get_package` with `opik-local-output-checks` to read it; when the user agrees to try it, call again with `start_trial: true` (needs an account: https://whatworks.dev/connect.md) for a trial ticket.

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.