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

[Feature Request]: Allow RagEvaluatorPack to use HuggingFace/Open Source Embeddings #13460

Open
v-sonawane opened this issue May 13, 2024 · 1 comment
Labels
enhancement New feature or request triage Issue needs to be triaged/prioritized

Comments

@v-sonawane
Copy link

Feature Description

This will allow user's to evaluate their RAG pipeline with the synthetic eval dataset generated using llama_index.core.llama_dataset.generator without an OpenAI API Key

Reason

Currently, RagEvaluatorPack only supports OpenAI Embeddings. While judge_llm allows the user to use open source LLMs, the method still requires an OpenAI API Key to run owing to the following code.

Source code from llama-index-packs/llama-index-packs-rag-evaluator/llama_index/packs/rag_evaluator/base.py, line 94

def _prepare_judges(self):
"""Construct the evaluators."""
judges = {}
judges["correctness"] = CorrectnessEvaluator(
llm=self.judge_llm,
)
judges["relevancy"] = RelevancyEvaluator(
llm=self.judge_llm,
)
judges["faithfulness"] = FaithfulnessEvaluator(
llm=self.judge_llm,
)
judges["semantic_similarity"] = SemanticSimilarityEvaluator(
embed_model=OpenAIEmbedding() #this line requires an OpenAI API key from the user's end
)
return judges

image

Value of Feature

No response

@v-sonawane v-sonawane added enhancement New feature or request triage Issue needs to be triaged/prioritized labels May 13, 2024
@logan-markewich
Copy link
Collaborator

@v-sonawane fyi, the main purpose of llama-packs is to actually give you boiler-plate code you can quickly copy and modify. I highly recommend also just doing that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage Issue needs to be triaged/prioritized
Projects
None yet
Development

No branches or pull requests

2 participants