Guardrails is a Python package that lets a user add structure, type and quality guarantees to the outputs of large language models (LLMs). At the heart of Guardrails is the rail spec. rail is intended to be a language-agnostic, human-readable format for specifying structure and type information, validators and corrective actions over LLM outputs. We create a RAIL spec to describe the expected structure and types of the LLM output, the quality criteria for the output to be considered valid, and corrective actions to be taken if the output is invalid.
Features
- Does pydantic-style validation of LLM outputs
- Semantic validation such as checking for bias in generated text, checking for bugs in generated code, etc.
- Takes corrective actions (e.g. reasking LLM) when validation fails
- Enforces structure and type guarantees (e.g. JSON)
- Guardrails provides a format (.rail) for enforcing a specification on an LLM output
- Lightweight wrapper around LLM API calls to implement this spec
Categories
Large Language Models (LLM)License
Apache License V2.0Follow Guardrails
You Might Also Like
Don’t settle when it comes to managing your clients’ IT infrastructure. Exceed their expectations with ConnectWise RMM, our MSP RMM software that provides proactive tools and NOC services—regardless of device environment. With the number of new vulnerabilities rising each year, smart patching procedures have never been more important. We automatically test and deploy patches when they are viable and restrict patches that are harmful. Get better protection for clients while you spend less time managing endpoints and more time growing your business. It’s tough to locate, afford, and retain quality talent. In fact, 81% of IT leaders say it’s hard to find the recruits they need. Add ConnectWise RMM, NOC services and get the expertise and problem resolution you need to become the advisor your clients demand—without adding headcount.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of Guardrails!