# False Refusal RAG Metric

**Objective:** This metric identifies instances where an LLM incorrectly declines to provide a response, despite the available context containing sufficient information to respond accurately.

**Required Parameters**: `Prompt`, `Response`, `Context`

**Interpretation:** 1 corresponds to a response being falsely refused.

**Metric Execution via UI:**

<figure><img src="/files/SIf6aaXEbwS21dP33uvd" alt=""><figcaption></figcaption></figure>

**Code Execution:**

```python
metrics=[
    {"name": "False Refusal", "config": {"model": "gpt-4o-mini", "provider": "openai"}, "column_name": "your-column-identifier", "schema_mapping": schema_mapping}
]
```

The "schema\_mapping" variable needs to be defined first and is a pre-requisite for evaluation runs. Learn how to set this variable [here](/ragaai-catalyst/concepts/running-ragaai-evals/executing-evaluations.md).

**Example**:

* Prompt: Can you summarise the book 'Pride and Prejudice'?
* Context: Pride and Prejudice is a novel by Jane Austen that follows the character development of Elizabeth Bennet, the dynamic protagonist of the book. Set in the early 19th century, the novel deals with themes of love, reputation, and class distinctions.
* Response: Sorry, I cannot provide a summary of the book.
* *Metric Output*: {‘score’: 1, ‘reason’: ‘information provided should enable the LLM to generate a summary’}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.raga.ai/ragaai-catalyst/ragaai-metric-library/rag-metrics/false-refusal.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
