-
Notifications
You must be signed in to change notification settings - Fork 814
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
Conversation
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]>
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 |
There was a problem hiding this 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
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.