tensorfolk

LLM-as-judge

A model grades outputs against a rubric. Cheap and scalable, but it must be calibrated against human labels.

Evolving: the basics hold, details shift. Reviewed 17 Oct 2026.

Key ideas

In code

python
JUDGE = '''Criterion: the answer cites only facts present in <context>.
Return JSON: {"reasoning": str, "pass": bool}'''

verdict = judge.run_sync(f'{JUDGE}\n<context>{ctx}</context>\n<answer>{ans}</answer>')

Common mistakes