# chunk.Metric


A named metric value associated with a retrieved chunk.


Usage

``` python
chunk.Metric(
    name,
    value,
)
```


Metrics are used to store retrieval scores and other measurements that describe how well a chunk matches a query.


## Parameters


`name: str`  
The name of the metric (e.g., "similarity", "bm25_score").

`value: float`  
The numeric value of the metric.


## Examples


``` python
from raghilda.chunk import Metric

similarity = Metric(name="similarity", value=0.95)
print(f"{similarity.name}: {similarity.value}")
```


    similarity: 0.95
