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

Improve error message for missing embeddings in Answer Relevancy Metric #1877

Merged
merged 8 commits into from
Jan 24, 2025

Conversation

sahusiddharth
Copy link
Collaborator

Enhanced the error message in the answer relevancy metric to provide more clarity when embeddings are not set. The new message now explicitly states the requirement for embeddings to be set.

sahusiddharth and others added 7 commits January 22, 2025 02:03
fix a minor mismatch of the default value in the docstring
…h. (explodinggradients#1853)

This pull request includes several changes to the `PromptMixin` class in
the `src/ragas/prompt/mixin.py` file. The changes focus on adding a
`name` attribute to the class and using this attribute when saving and
loading prompts. This solves the error when saving and loading several
prompts of different Synthesizers (e.g.
MultiHopAbstractQuerySynthesizer, MultiHopSpecificQuerySynthesizer,
SingleHopSpecificQuerySynthesizer etc.) as they had the same path
associated:

```
themes_personas_matching_prompt_english -> single_hop_specifc_query_synthesizer_themes_personas_matching_prompt_english
query_answer_generation_prompt_english -> single_hop_specifc_query_synthesizer_query_answer_generation_prompt_english
```

### Changes to `PromptMixin` class:

* Added a `name` attribute to the `PromptMixin` class.
* Modified the `save_prompts` method to include the `name` attribute in
the prompt file name.
* Modified the `load_prompts` method to include the `name` attribute in
the prompt file name.

---------

Co-authored-by: jjmachan <[email protected]>
Co-authored-by: Jithin James <[email protected]>
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jan 24, 2025
@jjmachan
Copy link
Member

looks good but I'll give you a task to learn git before merging this. right now you have a lot more commits here than the one you wanted to merge in.

make sure this branch only has the commit you want to merge in? ie f5de9e5?

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Jan 24, 2025
Copy link
Member

@jjmachan jjmachan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not was I was expecting - was hoping to see some rebase action but fair enough

@jjmachan jjmachan merged commit d1dd619 into explodinggradients:main Jan 24, 2025
16 checks passed
@sahusiddharth sahusiddharth deleted the minors branch January 25, 2025 10:09
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.

5 participants