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

LLMBasedFaithfulness does not work when using LLMs other than OpenAI #69

Open
kelvinchanwh opened this issue Jun 11, 2024 · 2 comments · May be fixed by #70
Open

LLMBasedFaithfulness does not work when using LLMs other than OpenAI #69

kelvinchanwh opened this issue Jun 11, 2024 · 2 comments · May be fixed by #70

Comments

@kelvinchanwh
Copy link
Contributor

kelvinchanwh commented Jun 11, 2024

In continuous_eval/metrics/generation/text/llm_based.py, line 39, the full model parameters are not being passed to the LLMBasedContextCoverage class. This means that the code defaults to calling OpenAI API even if another LLM is passed as self.model

Changes requied

AS-IS:
context_coverage = LLMBasedContextCoverage(use_few_shot=self.use_few_shot)

TO-BE:

context_coverage = LLMBasedContextCoverage(model=self._llm, use_few_shot=self.use_few_shot)
@yisz
Copy link
Contributor

yisz commented Jun 11, 2024

Great catch, thanks @kelvinchanwh!

@ellipsis-dev can you fix this and submit a PR.

@kelvinchanwh kelvinchanwh changed the title LLMBasedFaithfulness does not work when not using LLMs other than OpenAI LLMBasedFaithfulness does not work when using LLMs other than OpenAI Jun 11, 2024
ellipsis-dev bot added a commit that referenced this issue Jun 11, 2024
@kelvinchanwh
Copy link
Contributor Author

The code change should be to the following instead since model is stored in self._llm

line 39:
AS-IS: context_coverage = LLMBasedContextCoverage(use_few_shot=self.use_few_shot)
TO-BE: context_coverage = LLMBasedContextCoverage(model=self._llm, use_few_shot=self.use_few_shot)

kelvinchanwh added a commit to kelvinchanwh/continuous-eval that referenced this issue Jun 11, 2024
Fix issue relari-ai#69 where LLMs other than OpenAI APIs are not being called
yisz pushed a commit that referenced this issue Jun 11, 2024
Fix issue #69 where LLMs other than OpenAI APIs are not being called
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants