Skip to content

Commit

Permalink
Bug in documentation rag_testset_generation.md: API changes required …
Browse files Browse the repository at this point in the history
…arguments (#1714)

The code in rag_testset_generation.md code not compile and contains 2
syntax errors (API has changed)
I now added missing possitional arguments for embedding_model and
documents
  • Loading branch information
bmerkle authored Nov 29, 2024
1 parent 09676ca commit eb5f745
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/getstarted/rag_testset_generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ from ragas.testset.transforms import default_transforms, apply_transforms
transformer_llm = generator_llm
embedding_model = generator_embeddings

trans = default_transforms(llm=transformer_llm, embedding_model=embedding_model)
trans = default_transforms(documents=docs, llm=transformer_llm, embedding_model=embedding_model)
apply_transforms(kg, trans)
```

Expand All @@ -129,7 +129,7 @@ Now we will use the `loaded_kg` to create the [TestsetGenerator][ragas.testset.s
```python
from ragas.testset import TestsetGenerator

generator = TestsetGenerator(llm=generator_llm, knowledge_graph=loaded_kg)
generator = TestsetGenerator(llm=generator_llm, embedding_model=embedding_model, knowledge_graph=loaded_kg)
```

We can also define the distribution of queries we would like to generate. Here lets use the default distribution.
Expand Down

0 comments on commit eb5f745

Please sign in to comment.