Change8

v0.4.1

Breaking Changes
📦 ragas
1 breaking6 features🐛 2 fixes🔧 9 symbols

Summary

This release focuses heavily on migrating core metrics (ToolCallAccuracy, ToolCallF1, TopicAdherence, AgentGoalAccuracy, Rubrics) to utilize the collections API for better structure. It also introduces a breaking change by renaming `embed_text` to `aembed_text` in AnswerRelevancy.

⚠️ Breaking Changes

  • The function `embed_text()` has been replaced by `aembed_text()` in the `AnswerRelevancy` metric. Users must update their code to use `aembed_text()` for asynchronous embedding calls.

Migration Steps

  1. If you are using `embed_text()` in `AnswerRelevancy`, replace all calls with `aembed_text()`.

✨ New Features

  • Added save/load methods to `BasePrompt`.
  • Migrated `ToolCallAccuracy` to use the collections API.
  • Migrated `ToolCallF1` to use the collections API with set-based F1 scoring.
  • Migrated `TopicAdherence` and `AgentGoalAccuracy` metrics to use the collections API.
  • Migrated Rubrics Metrics to use the collections API.
  • Added a new input parameter `LLM_CONTEXT` to the `TestsetGenerator` Class.

🐛 Bug Fixes

  • Fixed an issue where `apply_transforms` was not correctly handling `run_config` when it was None, by ensuring `run_config` defaults correctly.
  • Added support for Anthropic and Gemini clients when configuring custom clients.

🔧 Affected Symbols

BasePromptToolCallAccuracyToolCallF1TopicAdherenceAgentGoalAccuracyTestsetGeneratorapply_transformsAnswerRelevancy.embed_textAnswerRelevancy.aembed_text