> For the complete documentation index, see [llms.txt](https://docs.layerlens.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.layerlens.ai/more-in-this-section-6/custom-code-scorer.md).

# Recipe: create a custom scorer

Recipe — create a custom scorer (LLM-backed). Pointer to the SDK scorer + judge-creation samples.

In Stratix, custom scorers are **LLM-backed**: a scorer wraps a model + a prompt. The SDK shape:

```python
scorer = client.scorers.create(
 name="response-rubric",
 description="Rate response on factual accuracy",
 model_id=model.id,
 prompt="Rate the response on a 1-5 scale...",
)
```

CRUD covers `create`, `get`, `get_many(page=, page_size=)`, `update(id,...)`, `delete(id)`. Returned `Scorer` includes `model_id`, `model_name`, `model_company`, `prompt`.

For a complete custom-judge-with-validation example, see [`samples/core/judge_creation_and_test.py`](https://github.com/layerlens/stratix-python/blob/main/samples/core/judge_creation_and_test.py) — builds a custom PII detection judge and validates against known inputs.

For deterministic logic (regex, JSON-schema, exact match), encode the rule in the scorer's prompt or use a judge with rule-based goals.

## See also

* [SDK reference: scorers](/more-in-this-section-9/scorers-2.md)
* [Concept: Scorers](/8.-evaluate-score-the-outputs/scorers-1.md)
* [Stratix Premium — Scorers](/8.-evaluate-score-the-outputs/scorers.md)
