Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle embeddings for empty strings in AnswerSimilarity class #994

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

baptiste-pasquier
Copy link

@baptiste-pasquier baptiste-pasquier commented May 28, 2024

Fixes: #996

Some embedding models do not work with empty strings (for example Gemini) and return an error.
The error does not appear with OpenAI which returns an embeddings even for an empty string.

Proposed resolution: replace empty strings with " "

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Evaluation Error with Gemini/VertexAI: InvalidArgument due to Empty Text Content
1 participant