﻿---
title: Configuration: judy.yaml
description: judy reads judy.yaml from the current folder, or the file named by --config. Relative paths inside it resolve against its folder. A value that starts...
url: https://docs-v3-preview.elastic.dev/reference/configuration
---

# Configuration: judy.yaml
judy reads `judy.yaml` from the current folder, or the file named by `--config`. Relative paths inside it resolve against its
folder.
```yaml
clusters:
  dev: {url: env:ES_URL, api_key: env:ES_API_KEY}
targets:
  full:    {dsl:     {cluster: dev, index: docs, file: queries/full.json}, params: {title_boost: 3}}
  esql:    {esql:    {cluster: dev, file: queries/full.esql}}
  dynamic: {builder: {cluster: dev, index: docs, command: [node, build-query.js]}}
  api:     {http:    {url: "https://example.test/search?q={{query}}", hits: "$.results", id: url}}
  replay:  {run:     {file: earlier.run}}
docs: {id: url, title: title, text: [summary, body], normalize: [trailing-slash]}
judge: {provider: anthropic}
modes: {semantic_fields: [body_semantic]}
```


## Secrets

A value that starts with `env:` reads an environment variable when it is used, so the file can be committed. judy also accepts a
secret written inline, so nothing stops you committing one: use `env:`.

## `clusters`

A map of names to Elasticsearch clusters.

| Key                    | Meaning                                 |
|------------------------|-----------------------------------------|
| `url`                  | the cluster URL                         |
| `api_key`              | an API key (`ApiKey` authentication)    |
| `username`, `password` | basic authentication, as an alternative |


## `targets`

A map of names to a target. Each has one kind key (`dsl`, `esql`, `builder`, `http` or `run`) holding the settings, and optionally
`params`. See [Targets](https://docs-v3-preview.elastic.dev/concepts/targets).

| Kind      | Settings                                                                                                          |
|-----------|-------------------------------------------------------------------------------------------------------------------|
| `dsl`     | `cluster`, `index`, `file` (a Query DSL template)                                                                 |
| `esql`    | `cluster`, and exactly one of `query` (inline) or `file`                                                          |
| `builder` | `command` (a list), `cluster`, `index`, `cwd`, `timeout_seconds`, `lifetime` (`query`, the default, or `process`) |
| `http`    | `url`, `method`, `headers`, `body_file`, `hits`, `id`, `title`, `text`, `score`                                   |
| `run`     | `file` (a TREC run file)                                                                                          |

`params` is a map of tuning parameters for `{{params.name}}` in templates and for builders. `--target name:key=value` overrides one
for a run.

## `docs`

How documents are read from hits.

| Key         | Meaning                                                                            |
|-------------|------------------------------------------------------------------------------------|
| `id`        | the field holding the id your judgements use (read from `_source`, not `_id`)      |
| `title`     | the title, for reports and the LLM                                                 |
| `text`      | a list of fields holding the text, for the LLM and the advisors                    |
| `normalize` | ids are made comparable on both sides: `lowercase`, `trailing-slash`, `strip-host` |


## `judge`

The LLM behind `judge`, `diagnose`, `suggest` and `synthesize`.

| Key                       | Meaning                                                                                                        |
|---------------------------|----------------------------------------------------------------------------------------------------------------|
| `provider`                | `anthropic`, `openai` or `eis`                                                                                 |
| `model`                   | the model (for `eis`, the name recorded with labels)                                                           |
| `api_key`                 | `env:NAME`; Anthropic defaults to `env:ANTHROPIC_API_KEY`                                                      |
| `base_url`                | for OpenAI-compatible endpoints and proxies                                                                    |
| `cluster`, `inference_id` | for `eis`: the cluster and the chat-completion endpoint, such as `.anthropic-claude-4.5-haiku-chat_completion` |
| `effort`                  | an optional effort level for Anthropic models that accept one                                                  |
| `batch_size`              | documents graded per model call                                                                                |

`--provider` and `--model` on a command override these for one run.

## `modes`


| Key               | Meaning                                                                                                                                                |
|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|
| `semantic_fields` | fields that make a `match` on them count as semantic, such as a `semantic_text` field. See [modes](https://docs-v3-preview.elastic.dev/concepts/modes) |