# Running Ragas metrics inside DeepEval: does DeepEval's RAGAS wrapper work today? (7 Nov 2026, IST)

DeepEval ships wrapper metrics (`deepeval.metrics.ragas`: RAGASFaithfulnessMetric, RAGASContextualPrecisionMetric, RAGASContextualRecallMetric and others) that call the ragas library. We installed both into fresh Python 3.13.5 venvs and scored one RAG test case (`case.py`) with three wrappers, judge pointed at a **local OpenAI-compatible stand-in** through langchain-openai's `ChatOpenAI` (`mock.py`; `OPENAI_API_KEY` unset; `RAGAS_DO_NOT_TRACK=true`). Run 7 Nov 2026 ~11:30-11:40 IST with `runall.sh`.

Environments (raw/*.versions.txt): **plain** = `pip install deepeval==4.3.3 ragas==0.4.3 langchain-openai` (pip resolved langchain-community 0.4.2); **pinned** = the same plus `langchain-community==0.4.1`.

## Results (raw/summary.txt)

| Env | Metric | Requests to the local judge | Outcome |
|---|---|---|---|
| plain | faithfulness / precision / recall | 0 / 0 / 0 | `ModuleNotFoundError: Please install ragas to use this metric. pip install ragas.` although ragas 0.4.3 was installed |
| pinned | faithfulness | 2 | score returned |
| pinned | contextual precision | 3 | score returned |
| pinned | contextual recall | 1 | score returned |
| pinned, judge replies Ragas cannot parse | faithfulness | 5 (2 + 3 fix-format retries) | score NaN, no exception, exit 0 |

What we saw:
- In the plain install the real error, visible higher up the traceback (raw/plain-faithfulness.out), is `No module named 'langchain_community.chat_models.vertexai'` raised by `import ragas`, the same break we hit on 28 Oct and Ragas issue #2995 describes (still open on 7 Nov 2026). DeepEval catches it and reports "Please install ragas", which points you the wrong way. Pinning langchain-community 0.4.1 fixed it.
- When the judge's replies did not match the JSON format Ragas asked for (we used our unmodified 4 Nov stand-in, `mock_unparseable.py`), Ragas retried with "fix the output" prompts, logged "failed to parse output", and the DeepEval wrapper returned a NaN score without raising. A CI gate that only checks for exceptions would not notice.

Caveats: scores come from a stand-in judge and mean nothing (`mock.py` here is a 7 Nov copy that also reads the JSON Schema Ragas prints in its prompts). Request counts are for this one short case and these versions. We did not test RAGASAnswerRelevancyMetric, which also needs an embeddings model.

Files: mock.py, mock_unparseable.py, case.py, run_wrapper.py, runall.sh, raw/.
