Skip to content

Commit c477e1e

Browse files
authored
docs: document loaders support (#202)
1 parent 793bf9a commit c477e1e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/concepts/testset_generation.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,27 @@ Moving forward, we are will be expanding the range of evolution techniques to of
3535

3636
## Example
3737

38+
```{code-block} python
39+
:caption: loading documents using langchain
40+
from langchain.document_loaders import PubMedLoader
41+
42+
loader = PubMedLoader("liver", load_max_docs=10)
43+
documents = loader.load()
44+
```
45+
Checkout [langchain](https://python.langchain.com/docs/modules/data_connection/document_loaders/) document loaders to see more examples
46+
47+
```{code-block} python
48+
:caption: loading documents using llama-index
49+
from llama_index import download_loader
50+
51+
SemanticScholarReader = download_loader("SemanticScholarReader")
52+
loader = SemanticScholarReader()
53+
query_space = "large language models"
54+
documents = loader.load_data(query=query_space, limit=10)
55+
```
56+
Checkout [llama-index](https://gpt-index.readthedocs.io/en/stable/core_modules/data_modules/connector/root.html) document loaders to see more examples
57+
58+
3859
```{code-block} python
3960
:caption: Customising test set generation
4061
from ragas.testset import TestsetGenerator

0 commit comments

Comments
 (0)