You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[x] I have checked the documentation and related resources and couldn't resolve my bug.
Describe the bug
When attempting to evaluate a dataset using Gemini, an InvalidArgument error occurs indicating that the text content is empty. This issue arises specifically when using the evaluate function with the VertexAIEmbeddings from Langchain. Empty strings in the dataset seem to cause the error during the embedding process. The same evaluation process works without errors when using the OpenAI embeddings. The answer_similarity metric is used for evaluation.
Ragas version: 0.1.8
Python version: 3.10.13
Code to Reproduce
fromdatasetsimportDatasetfromragasimportevaluatefromragas.metricsimportanswer_similaritydata= {
"answer": [
"Paris is the capital of France.",
"",
"Paris is the capital of France.",
"",
],
"ground_truth": [
"Paris",
"Paris",
"",
"",
],
}
dataset=Dataset.from_dict(data)
baptiste-pasquier
changed the title
Evaluation Error with Gemini: InvalidArgument due to Empty Text Content
Evaluation Error with Gemini/VertexAI: InvalidArgument due to Empty Text Content
May 28, 2024
[x] I have checked the documentation and related resources and couldn't resolve my bug.
Describe the bug
When attempting to evaluate a dataset using Gemini, an
InvalidArgument
error occurs indicating that the text content is empty. This issue arises specifically when using the evaluate function with theVertexAIEmbeddings
from Langchain. Empty strings in the dataset seem to cause the error during the embedding process. The same evaluation process works without errors when using the OpenAI embeddings. Theanswer_similarity
metric is used for evaluation.Ragas version: 0.1.8
Python version: 3.10.13
Code to Reproduce
With OpenAI (no error):
Output:
With Gemini (error):
Error trace
Open error trace
The text was updated successfully, but these errors were encountered: