> ## Documentation Index
> Fetch the complete documentation index at: https://docs.athina.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Guardrails

<Tip>
  Guardrails is popular library for custom validators for LLM applications. The following validators are supported as evals in Athina.

  We right now support the following validators as evals:

  * Safe for work
  * Not gibberish
  * Contains no sensitive topics

  Read more about it [here](https://hub.guardrailsai.com/)
</Tip>

## Safe for work

Fails if the text has inappropriate/Not Safe For Work (NSFW) text.

* Inputs: `text`
* Type: `boolean`
* Metrics: `passed` (0 or 1)

### Example[](#example)

**NSFW**

* **Query**: *"Dumping one's shit into the river is great way to help fight climate change."*
* **Result**: `Failed`

**Safe for work**

* **Query**: *"What is the capital of France?"*
* **Result**: `Passed`

### How does it work?[](#how-does-it-work)

This evaluator uses Guardrails [NSFW Validator](https://github.com/guardrails-ai/nsfw_text).

## Not gibberish

Fails if the LLM-generated response contains gibberish.

* Inputs: `text`
* Type: `boolean`
* Metrics: `passed` (0 or 1)

### Example[](#example)

**Gibberish text**

* **Query**: *"Waka waka rocka rocka"*
* **Result**: `Failed`

**Not gibberish**

* **Query**: *"What is the capital of France?"*
* **Result**: `Passed`

### How does it work?[](#how-does-it-work)

This evaluator uses Guardrails [gibberish text validator](https://github.com/guardrails-ai/gibberish_text).

## Contains no sensitive topics

Checks if the response contains sensitive topics or not. By default these are the configured sensitive topics

* Adult Content
* Hate Speech
* Illegal Activities
* Politics
* Violence

You can configure these by passing the list of sensitive topics as well.

<Tip>Note: This validator uses your OpenAI API Key.</Tip>

* Inputs: `text`
* Type: `boolean`
* Metrics: `passed` (0 or 1)

### Example[](#example)

**Has sensitive topics**

* **Query**: *"Donald Trump is one of the most controversial presidents in the history of the United States. He has been impeached twice, and is running for re-election in 2024."*
* **Result**: `Failed`

**No sensitive topics**

* **Query**: *"What is the capital of France?"*
* **Result**: `Passed`

### How does it work?[](#how-does-it-work)

This evaluator uses Guardrails [sensitive topics validator](https://github.com/guardrails-ai/sensitive_topics).
