Model endpoints validate inputs against a strict schema before they reach the model. Input dimensions, data types, value ranges, and content length are enforced by the serving infrastructure. Inputs that fail validation are rejected with a structured error response and the rejection is logged.
For text inputs, injection pattern detection filters known adversarial patterns, including prompt injection payloads for LLM-based systems. For image inputs, format validation, dimension checks, and anomaly detection on pixel distributions can identify adversarial perturbations. For tabular inputs, range checks and type enforcement prevent out-of-specification values from reaching the model.
Request size limits (the nginx client_max_body_size directive or equivalent) prevent oversized adversarial inputs designed to consume excessive memory or processing time. The input validation schema is derived from the model’s documented input specification and updated whenever the input format changes. Validation is enforced at the serving infrastructure level, not within the model code, ensuring it cannot be bypassed.
Key outputs
- Strict input schema validation at the serving infrastructure level
- Injection pattern detection for text inputs
- Request size limits preventing oversized inputs
- Module 9 AISDP documentation