Find answers from the community

Home
Members
ashishabraham22
a
ashishabraham22
Offline, last seen 3 months ago
Joined September 25, 2024
Hi all ,
I am evaluating a RAG using Ragas. Having issues with ragas integration in llamaindex. I am using Qdrant DB.
from ragas.integrations.llama_index import evaluate
from ragas.metrics import faithfulness, answer_relevancy, context_precision, context_recall
Settings.chunk_size = chunk_size
Settings.chunk_overlap = chunk_overlap
Settings.embed_model = embed_model
Settings.llm = llm

query_engine = vector_index.as_query_engine()

# Prepare the dataset
dataset = Dataset.from_dict(ds_dict)

# Define metrics
metrics = [
faithfulness,
answer_relevancy,
context_precision,
context_recall,
]

# Evaluate using Ragas
start_time = time.time()
result = evaluate(
query_engine=query_engine,
metrics=metrics,
dataset=dataset,
llm=llm,
embeddings=embed_model,
raise_exceptions=False,
)

Throwing the same exception with LangChain also.
9 comments
L
k
a