Skip to content

Commit

Permalink
docs: document loaders support (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahules786 authored Oct 19, 2023
1 parent 793bf9a commit c477e1e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/concepts/testset_generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,27 @@ Moving forward, we are will be expanding the range of evolution techniques to of

## Example

```{code-block} python
:caption: loading documents using langchain
from langchain.document_loaders import PubMedLoader
loader = PubMedLoader("liver", load_max_docs=10)
documents = loader.load()
```
Checkout [langchain](https://python.langchain.com/docs/modules/data_connection/document_loaders/) document loaders to see more examples

```{code-block} python
:caption: loading documents using llama-index
from llama_index import download_loader
SemanticScholarReader = download_loader("SemanticScholarReader")
loader = SemanticScholarReader()
query_space = "large language models"
documents = loader.load_data(query=query_space, limit=10)
```
Checkout [llama-index](https://gpt-index.readthedocs.io/en/stable/core_modules/data_modules/connector/root.html) document loaders to see more examples


```{code-block} python
:caption: Customising test set generation
from ragas.testset import TestsetGenerator
Expand Down

0 comments on commit c477e1e

Please sign in to comment.