# Create the answer relevancy scoring metric
answer_relevancy = RagasMetricWrapper(
    ragas_answer_relevancy,
    track=True  # Enable tracing for the metric computation
)
```

<Tip>
  If you are running within a Jupyter notebook, you will need to add the following line to the top of your notebook:

  ```python
  import nest_asyncio
  nest_asyncio.apply()
  ```
</Tip>

### 3. Use the metric wrapper within the Opik evaluation platform

You can now use the metric wrapper directly within the Opik evaluation platform:

```python
from opik.evaluation import evaluate

evaluation_task = evaluate(
    dataset=dataset,
    task=evaluation_task,
    scoring_metrics=[answer_relevancy],
    nb_samples=10,
)
```

The `RagasMetricWrapper` automatically handles:

* Field mapping between Opik and Ragas (e.g., `input` → `user_input`, `output` → `response`)
* Async execution of Ragas metrics
* Integration with Opik's tracing system when `track=True`
* Proper error handling for missing required fields