shield
Basic Information
Pegasi Shield is a lightweight safety and reliability layer designed to sit between your application and any large language model provider. It inspects every prompt and response to detect and block unsafe content, edit outputs that violate policy, and log decisions for auditing while aiming for minimal latency and no data egress. The repository includes middleware and examples to wrap LLM calls (example shows Shield.chat_completion wrapping an OpenAI client), a research module called FRED for hallucination detection and editing, demo notebooks, and deployment artifacts such as a pure‚ÄëPython package, Docker image and Helm chart. Configuration is supported via YAML or Python, and the library emits structured traces and metrics for observability.