Back to directory

Guardrails AI

A Python framework for adding input/output guards to large language models, detecting and mitigating risks and generating structured data from LLM output.

Guardrails AI

Guardrails is a Python framework that helps build reliable AI applications by running Input/Output Guards that detect, quantify and mitigate specific types of risk in an application, and by helping generate structured data from LLMs.

Guardrails Hub is a collection of pre-built validators, each measuring a specific type of risk, that can be combined into Guards intercepting the inputs and outputs of an LLM; a Guardrails Index benchmark compares the performance and latency of 24 such guardrails across six common risk categories. After installing the package and the Guardrails Hub CLI, a validator such as a regex match, competitor check or toxic-language check is installed individually and combined into a Guard, which reports validation failures with the specific rule that was broken.

Structured data generation works by defining a Pydantic model representing the desired output shape and asking an LLM to fill it, with Guardrails validating the result. Guardrails is moving its validators to standard PyPI packages installed directly with pip and discontinuing hosted remote inferencing, with a stated cutoff date for the migration.

More in AI evals

See all 269
  • Provenance gate

    github.com

    A deterministic authorization gateway that sits between an AI agent and its tools, tracing where each parameter of a side-effect call came from, and blocking the call or asking a human when the source does not check out.

  • JevBench

    benchmarkheaven.com

    A reproducible benchmark from Benchmark Heaven that ranks Jev-class typed decision models on intelligence, calibration, speed, and cost, with a published harness, scoring rules, and results.

  • A co-evolutionary adversarial red-teaming tool for AI agents that uses quality-diversity evolutionary search to autonomously breed edge-case scenarios, testing whether an agent with tool access can be made to hallucinate, deadlock or leak funds.