Skip to content

fix: ragas evaluator - column mapping, embeddings param, venv setup - #3

Open
Kos-M wants to merge 3 commits into
masterfrom
feat/ragas-evaluator-fixes
Open

fix: ragas evaluator - column mapping, embeddings param, venv setup#3
Kos-M wants to merge 3 commits into
masterfrom
feat/ragas-evaluator-fixes

Conversation

@Kos-M

@Kos-M Kos-M commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Summary

Fixed the RAGAS evaluator in the acg_protocol project. The root cause was a litellm version incompatibility — version 1.88.1 has a bug where SupportedPromptIntegrations enum is missing ARIZE_PHOENIX but the arize module tries to access it, causing AttributeError on any import chain touching litellm (agent.py → strands → litellm).

Also fixed deprecated ragas metric imports.

Changes

Setup

  • Created virtual environment (venv) in project root
  • Installed all dependencies with compatible versions

Bug Fixes

  1. requirements.txt:

    • Pinned litellm==1.85.5 (working version without the ARIZE_PHOENIX enum bug)
  2. src/ragas_evaluator.py:

    • Updated metric imports from deprecated ragas.metrics to ragas.metrics.collections (ragas 0.4.x API)
    • Added embeddings=ragas_embeddings to evaluate() call
    • Updated docstring column names to match ragas API
  3. src/evaluation_data.py (previous commit):

    • Fixed column names: questionuser_input, contextsretrieved_contexts, answerresponse
    • Required by ragas metrics: faithfulness, answer_relevancy, context_recall, context_precision

Verification

  • All imports pass cleanly (no deprecation warnings for ragas metrics, no AttributeError from litellm)
  • ragas version 0.4.3 column names verified: user_input, retrieved_contexts, response, reference all match API requirements

WEBFORGE Agent and others added 3 commits June 13, 2026 20:55
…tion warnings

Root cause: litellm 1.88.1 has a bug where the SupportedPromptIntegrations enum
is missing ARIZE_PHOENIX but arize/__init__.py tries to access it, causing
AttributeError on any import chain touching litellm (e.g., agent.py -> strands -> litellm).

Fixes:
- Pin litellm==1.85.5 (confirmed working version without the bug)
- Update ragas metric imports from ragas.metrics to ragas.metrics.collections
  to remove deprecation warnings (ragas 0.4.3 API)
litellm==1.85.5 requires:
- fastuuid>=0.14.0 (was pinned to 0.13.5)
- openai>=2.20.0 (was pinned to 2.2.0)

Updated both to minimum compatible versions to resolve ResolutionImpossible errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant