# Pass-Ratio\@n

**Objective:**

Pass-Ratio\@n evaluates the percentage of generated programs that pass all specified test cases, offering a straightforward measure of code functionality. It is ideal for applications where code correctness is binary and critical for success.

**Required Columns in Dataset:**

`Generated Program`, `Test Cases`

**Interpretation:**

* **High Pass-Ratio\@n:** Indicates that a majority of generated programs are functionally correct, passing all test cases.
* **Low Pass-Ratio\@n:** Suggests functional inaccuracies, as fewer generated programs meet all test requirements.

**Execution via UI:**

<figure><img src="https://1811327582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYbIiNdp1QbG4avl7VShw%2Fuploads%2FCsBidLHqjctJJTQe5C4f%2FScreenshot%202024-10-28%20at%204.51.25%E2%80%AFPM.png?alt=media&#x26;token=6a734085-c695-4f8e-a6e7-8f2ec2620909" alt=""><figcaption></figcaption></figure>

**Execution via SDK:**

```python
metrics=[
    {"name": "Pass-Ratio@n", "schema_mapping": {"generated_program": "Generated Program", "test_cases": "Test Cases"}}
]

```
