Skip to content

Conversation

@sanjeed5
Copy link
Contributor

Issue Link / Problem Description

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

  • Automated tests added/updated: N/A (documentation only)
  • 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 docs: Add documentation for metrics.collections API #2407 documentation style

References

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 warnings

Thank you for reviewing! This PR completes the collections API documentation migration started in PR #2407.

… API

- Added new primary example using collections-based API with ResponseGroundedness
- Added synchronous usage note with .score() method
- Moved legacy SingleTurnSample example to Legacy Metrics API section
- Tested new example and verified it produces expected output (score: 1.0)
- Add primary example using ContextRecall from ragas.metrics.collections
- Include synchronous usage note with .score() method
- Move LLMContextRecall to legacy section with deprecation warning
- Keep NonLLMContextRecall and IDBasedContextRecall as valid alternatives (no collections API equivalents)
- Tested example and verified output
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Nov 12, 2025
@anistark anistark merged commit d4aa665 into explodinggradients:main Nov 12, 2025
6 checks passed
anistark pushed a commit that referenced this pull request Nov 17, 2025
…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 warnings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants