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

feat: langchain documents support for TestsetGenerator #201

Merged
merged 3 commits into from
Oct 19, 2023

Conversation

jjmachan
Copy link
Member

@jjmachan jjmachan commented Oct 18, 2023

Usage

from langchain.document_loaders import PubMedLoader
from ragas.testset import TestsetGenerator

loader = PubMedLoader("liver", load_max_docs=10)
docs = loader.load()
len(docs)
# 10

testsetgenerator = TestsetGenerator.from_default()
test_size = 10
testset = testsetgenerator.generate(docs, test_size=test_size)
test_df = testset.to_pandas()
test_df.head()

@jjmachan jjmachan marked this pull request as ready for review October 19, 2023 06:18
@jjmachan jjmachan merged commit 793bf9a into explodinggradients:main Oct 19, 2023
14 checks passed
@jjmachan jjmachan deleted the feat/langchain-docs branch October 19, 2023 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant