Already tracing with Morph? You don’t need this — pass
evals on a begin()
turn and Morph labels traces for you, off your request path. See
Run evals automatically on your traces.
This page is for teams whose traces live in Langfuse.Before you start
- A Morph API key (
sk-...). - A Reflex
modelid and its exact labels — categories in Langfuse must byte-match these. List a model’s labels with one prediction:
Set up the evaluator
1
Open Evaluators → Set up evaluator → LLM-as-a-judge
In Langfuse, go to Evaluators, click Set up evaluator, and choose LLM-as-a-judge.
2
Add a Morph LLM connection
Click Change the provider → Add LLM connection and configure it:
- Provider / schema: OpenAI (Morph is OpenAI-compatible).
-
API key: your Morph
sk-...key. -
Open Advanced settings and set the API Base URL to:
Leave Use Responses API and Extra Headers off — you don’t need them.
-
Turn off Use default models, and under Custom models add the Reflex
modelids you want to use (e.g.jailbreak).
3
Name the evaluator
Under Define evaluator, give it any name you like, e.g.
jailbreak.4
Write the evaluation prompt
The evaluation prompt is the text Morph classifies — put just the variable you want judged and nothing else:
5
Score type: Categorical, single category
Set Score type to Categorical.
- Categories: add one per Reflex label, spelled exactly as the model emits them (for a built-in Reflex, copy them from Default Reflexes below). They must be exhaustive — add a catch-all only if your model has that label.
- Do not enable “Allow multiple matches.” The evaluator returns exactly one category (the top prediction).
6
Leave the reasoning + selection prompts as-is
The Score reasoning prompt and Category selection prompt can stay at their defaults — Morph does not read them. The returned reasoning is always
NA-Reflex, since Reflexes are classifiers and emit no rationale.7
Save
Save the evaluator. To verify a run, open a score and choose View execution trace (environment
langfuse-llm-as-a-judge) to see the exact request Langfuse sent and the category Morph returned.8
Run it
The evaluator scores new matching traces automatically as they come in. To score traces you already have, open the Traces table, select the rows you want (or select all), and click Evaluate at the bottom.
Default Reflexes
Copy themodel id into the connection’s Custom models, and the categories into the evaluator’s Categories — exactly as written, they’re case-sensitive.
domain is multi-label, but with Allow multiple matches off the evaluator returns its single top label.