Commit d4aa665
authored
docs: complete collections API documentation for remaining metrics (#2420)
## Issue Link / Problem Description
- Follow-up to PR #2407
- Completes the migration to collections-based API documentation for
metrics that were not covered in the initial PR
## Changes Made
- Updated **ContextRecall** documentation to showcase
`ragas.metrics.collections.ContextRecall` as the primary example
- Updated **FactualCorrectness** documentation to showcase
`ragas.metrics.collections.FactualCorrectness` with configuration
options (mode, atomicity, coverage)
- Updated **ResponseGroundedness** documentation in nvidia_metrics.md to
showcase `ragas.metrics.collections.ResponseGroundedness` as the primary
example
- Moved all legacy API examples to "Legacy Metrics API" sections with
deprecation warnings
- Added synchronous usage notes (`.score()` method) for all three
metrics
- Preserved all conceptual explanations and "How It's Calculated"
sections
## Testing
### How to Test
- [x] Automated tests added/updated: N/A (documentation only)
- [x] Manual testing steps:
1. Verified `make build-docs` succeeds without errors ✓
2. Tested all new code examples to ensure they work as documented
3. Confirmed output values match expected results
4. Verified consistency with PR #2407 documentation style
## References
- Related issues: Follow-up to PR #2407
- Documentation:
- Updated: `docs/concepts/metrics/available_metrics/context_recall.md`
- Updated:
`docs/concepts/metrics/available_metrics/factual_correctness.md`
- Updated: `docs/concepts/metrics/available_metrics/nvidia_metrics.md`
(ResponseGroundedness section)
- Pattern reference: PR #2407 (faithfulness.md, context_precision.md,
answer_correctness.md)
## Screenshots/Examples (if applicable)
All three metrics now follow the consistent pattern:
1. **Primary Example**: Collections-based API (modern, recommended)
2. **Concepts**: Implementation-agnostic explanation
3. **Synchronous Usage Note**: `.score()` method alternative
4. **Legacy Section**: Original API with deprecation timeline warnings1 parent 8b4653c commit d4aa665
File tree
3 files changed
+233
-50
lines changed- docs/concepts/metrics/available_metrics
3 files changed
+233
-50
lines changedLines changed: 48 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 3 | + | |
11 | 4 | | |
| 5 | + | |
12 | 6 | | |
13 | 7 | | |
14 | 8 | | |
15 | 9 | | |
16 | 10 | | |
17 | 11 | | |
18 | 12 | | |
19 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
20 | 57 | | |
21 | 58 | | |
22 | 59 | | |
| |||
31 | 68 | | |
32 | 69 | | |
33 | 70 | | |
34 | | - | |
35 | 71 | | |
36 | | - | |
| 72 | + | |
| 73 | + | |
37 | 74 | | |
38 | 75 | | |
39 | 76 | | |
| |||
Lines changed: 125 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
5 | 75 | | |
6 | 76 | | |
7 | 77 | | |
| |||
30 | 100 | | |
31 | 101 | | |
32 | 102 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | 103 | | |
64 | 104 | | |
65 | 105 | | |
| |||
161 | 201 | | |
162 | 202 | | |
163 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
Lines changed: 60 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
251 | 252 | | |
252 | 253 | | |
253 | | - | |
254 | | - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
255 | 257 | | |
256 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
257 | 267 | | |
258 | 268 | | |
259 | 269 | | |
260 | 270 | | |
261 | 271 | | |
262 | 272 | | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
| 273 | + | |
267 | 274 | | |
268 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
269 | 278 | | |
270 | | - | |
| 279 | + | |
271 | 280 | | |
272 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
273 | 292 | | |
274 | 293 | | |
275 | 294 | | |
| |||
299 | 318 | | |
300 | 319 | | |
301 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
0 commit comments