> This page is for version v2 API (default).
> For other versions, use one of these documentation indexes:
> - v2 API (default): https://docs.cohere.com/v2/llms.txt
> - v1 API: https://docs.cohere.com/v1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.cohere.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.cohere.com/_mcp/server.

# How to Evaluate your LLM Response

> Learn how to use Command-R to evaluate natural language responses with an example of grading formality.

You can leverage [Command A](/v2/docs/command-a) to evaluate natural language responses that cannot be easily scored with manual rules.

**Prompt**

```
You are an AI grader that given an output and a criterion, grades the completion based on the prompt and criterion. Below is a prompt, a completion, and a criterion with which to
grade the completion. You need to respond according to the criterion instructions.

## Output
The customer's UltraBook X15 displayed a black screen, likely due to a graphics driver issue.
Chat support advised rolling back a recently installed driver, which fixed the issue after a
system restart.

## Criterion 
Rate the ouput text with a score between 0 and 1. 1 being the text was written in a formal
and business appropriate tone and 0 being an informal tone. Respond only with the score.
```

**Output**

```
0.8
```

**API Request**

**`PYTHON`**

```python PYTHON
import cohere

co = cohere.ClientV2(api_key="<YOUR API KEY>")

response = co.chat(
    model="command-a-plus-05-2026",
    messages=[
        {
            "role": "user",
            "content": """
    You are an AI grader that given an output and a criterion, grades the completion based on
    the prompt and criterion. Below is a prompt, a completion, and a criterion with which to grade
    the completion. You need to respond according to the criterion instructions.
    
    ## Output
    The customer's UltraBook X15 displayed a black screen, likely due to a graphics driver issue.
    Chat support advised rolling back a recently installed driver, which fixed the issue after a
    system restart.
    
    ## Criterion 
    Rate the ouput text with a score between 0 and 1. 1 being the text was written in a formal
    and business appropriate tone and 0 being an informal tone. Respond only with the score.
    """,
        }
    ],
)

print(response.message.content[0].text)
```