Migrating to RAGAS v0.4.2
Version v0.4.2 introduces 2 breaking changes. This guide details how to update your code.
Released: 12/23/2025
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
SQLSemanticEquivalenceDataCompyScoreCHRF Scorequoted spans metricTopicAdherenceBasePrompt.adapt()ToolCallF1MultiModalFaithfulnessMultiModalRelevancegoogle-genai SDKgoogle-generativeailitellmOpenAIAsyncOpenAIHuggingFace tokenizerBreaking Changes
●Issue #1
Legacy metrics have been deprecated and are being migrated to the new collections API.
✓Solution
Users should update their code to use the new metrics collections API for metrics like SQLSemanticEquivalence, DataCompyScore, CHRF Score, quoted spans, MultiModalFaithfulness, and MultiModalRelevance.
●Issue #2
In AG-UI integration, 'OpenAI' client initialization has been replaced with 'AsyncOpenAI'.
✓Solution
Update any direct instantiation or configuration referencing 'OpenAI' to use 'AsyncOpenAI' if using the AG-UI protocol integration.
Migration Steps
- 1Review usage of metrics that have been migrated to the collections API (e.g., SQLSemanticEquivalence, DataCompyScore, CHRF Score, quoted spans, MultiModalFaithfulness, MultiModalRelevance) and update imports/calls accordingly.
- 2If using AG-UI protocol integration, update any instantiation of 'OpenAI' to 'AsyncOpenAI'.
Release Summary
This release focuses heavily on migrating core metrics to the new collections API structure and introduces caching support for metrics and embeddings. Several bug fixes address issues related to instructor modes, type validation, and Claude workflow tokens.
Need More Details?
View the full release notes and all changes for RAGAS v0.4.2.
View Full Changelog