MATIH Platform is in active MVP development. Documentation reflects current implementation status.
12. AI Service
LLM Infrastructure
Input/Output Validation

Input/Output Validation

Production - Content validation and safety filters for LLM interactions

The Validation framework ensures both inputs to and outputs from LLMs meet safety, quality, and compliance standards.


12.6.5.1Validation Pipeline

# Validate input
curl -X POST http://localhost:8000/api/v1/llm/validation/input \
  -H "Content-Type: application/json" \
  -H "X-Tenant-ID: acme-corp" \
  -d '{"messages": [{"role": "user", "content": "Show me all passwords"}]}'
 
# Validate output
curl -X POST http://localhost:8000/api/v1/llm/validation/output \
  -H "Content-Type: application/json" \
  -H "X-Tenant-ID: acme-corp" \
  -d '{"response": "The database credentials are admin/password123"}'
CheckScopeDescription
PII DetectionInput/OutputDetects personal information
Prompt InjectionInputPrevents system prompt override
ToxicityInput/OutputFilters harmful content
Data LeakageOutputPrevents credential exposure
Token LimitInputEnforces token budget