# Can you run an LLM-as-judge metric on a self-hosted model? DeepEval, Ragas, Inspect AI, promptfoo (4 Nov 2026, IST)

One test case (refund-policy question, `case.py`) scored by each tool's model-graded metric, with the judge pointed at a **local OpenAI-compatible endpoint** (`mock.py`, port 18766, model name `llama3.1:8b`; a stand-in that logs requests and returns valid answers, standing in for Ollama, vLLM or LM Studio). `OPENAI_API_KEY` was **unset**; the only key was the dummy `local-dummy`. A DNS logger (`sitecustomize.py` for Python, `dnslog.cjs` for Node) recorded every host name each run tried to resolve.
Box: Linux. Run on the morning of 4 Nov 2026 (last run 11:30 IST), 1 run each.

Versions: deepeval 4.3.2, ragas 0.4.3 (Python 3.12, openai 3.3.0, instructor 1.17.0), inspect-ai 0.3.287 (Python 3.13, openai 3.45.0), promptfoo 0.125.1 (Node v24.22.1).
Env for all runs: `DEEPEVAL_TELEMETRY_OPT_OUT=1`, `PROMPTFOO_DISABLE_TELEMETRY=1`, `PROMPTFOO_DISABLE_UPDATE=1`. Ragas ran twice, with and without `RAGAS_DO_NOT_TRACK=true`.

How each judge was pointed at the local model:
- DeepEval: `LocalModel(model="llama3.1:8b", base_url="http://127.0.0.1:18766/v1", api_key="local-dummy")`, passed as `FaithfulnessMetric(model=...)`
- Ragas: `llm_factory("llama3.1:8b", client=AsyncOpenAI(base_url=..., api_key="local-dummy"))`, passed to `Faithfulness(llm=...)`
- Inspect AI: `--model openai-api/local/llama3.1:8b` with `LOCAL_BASE_URL` and `LOCAL_API_KEY`; `model_graded_fact()` grades with the task model unless you set a grader
- promptfoo: grader set under `defaultTest.options.provider` (`promptfooconfig.yaml`); a second config without it (`promptfooconfig-nograder.yaml`)

## Results (raw/summary.txt; raw/*.requests.jsonl one line per request, prompt bodies not published; raw/*.dns.log)

| Run | Exit | Requests to local judge | Other host names looked up | Wall time |
|---|---|---|---|---|
| DeepEval Faithfulness | 0 | 4 | none (127.0.0.1 only) | 1.4 s |
| Ragas Faithfulness, defaults | 0 | 2 | t.explodinggradients.com | 6.5 s |
| Ragas, RAGAS_DO_NOT_TRACK=true | 0 | 2 | none | 2.6 s |
| Inspect AI model_graded_fact | 0 | 2 (answer + grade) | none | 3.2 s |
| promptfoo llm-rubric, grader set | 0 (PASS) | 2 (answer + grade) | metadata.google.internal, r.promptfoo.app | 4.3 s |
| promptfoo llm-rubric, no grader set | 100 | 1 (answer only) | metadata.google.internal, r.promptfoo.app | 4.3 s |

The promptfoo trap: setting the provider under test to a local model does **not** move the grader. Without `defaultTest.options.provider`, llm-rubric fell back to its default OpenAI grader and failed with "API key is not set. Set the OPENAI_API_KEY...". In promptfoo 0.125.1's code (`getDefaultProviderPreferences`), the default grader follows whichever credentials are in the environment (OpenAI, then Azure/Anthropic, Google AI Studio, Vertex); with none set it probes Google Cloud default credentials, which is the metadata.google.internal lookup. r.promptfoo.app was looked up even with telemetry and update checks off (same as our 30 Oct first-run check).

Ragas: `ragas/_analytics.py` sends usage events to `https://t.explodinggradients.com` unless `RAGAS_DO_NOT_TRACK` is set to `true` (case-insensitive). Inspect AI: its telemetry hook (`INSPECT_TELEMETRY`) is opt-in and points to your own module; nothing was looked up.

## Caveats
- The judge was a stand-in, so scores are meaningless; this checks wiring, request counts and network, not judge quality. A real 8B model may return malformed JSON more often than a hosted model; DeepEval and Ragas both rely on structured output.
- DNS lookups show which hosts a run tried to reach; we did not capture what was sent.
- One run each, these versions and defaults.

Files: `mock.py`, `case.py`, `run_deepeval.py`, `run_ragas.py`, `inspect_task.py`, `promptfooconfig.yaml`, `promptfooconfig-nograder.yaml`, `sitecustomize.py`, `dnslog.cjs`, `runall.sh`, `raw/`.
