How the LLM Judge works
mainThe LLM Judge provides automated evaluation of write requests against a policy prompt. It is designed to reduce reliance on human reviewers for well-understood workloads.
Core Mechanics
- Provider: Uses AWS Bedrock with Anthropic models.
- Policy Management: Policies are stored in the
llm_policiestable as immutable, versioned records. Editing a policy always creates a new version. - User Assignment: Users can be assigned a specific policy via the
llm_policy_idforeign key in the user row.
Evaluation Modes
| Mode | Behavior |
|---|---|
llm (default) | The judge is invoked, and its decision (approve/deny) is applied directly to the request. |
passthrough | All requests are allowed through without being evaluated by the judge. |
Error Handling
If the judge returns an error, the system follows a configurable fallback mode (set per deployment):
deny(Safe Default): The request is rejected with a403error.passthrough: The request is allowed through.
Data Handling & Privacy
- No Redaction: The judge receives the full HTTP request verbatim (headers and body). This ensures the LLM has full context for accurate decisions. Security is managed via LLM provider agreements and network isolation rather than request sanitization.
- Decompression: To ensure policies are evaluated against plaintext, the proxy decompresses request bodies using the
Content-Encodingheader. Supported encodings includegzip,x-gzip,deflate, andbr(Brotli). If decompression fails or the encoding is unsupported, the original compressed body is passed to the judge. - Limits: Request bodies are buffered up to 10 MB for decompression. The judge consumes only the first 4 KB of the decompressed body text.