Skip to content

Commit

Permalink
Update rag.md (#1686)
Browse files Browse the repository at this point in the history
The import of JaccardSimilarityBuilder is wrong, therefore I fixed it.
  • Loading branch information
TimWue authored Nov 18, 2024
1 parent 44f09b8 commit 9da1ab7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/concepts/test_data_generation/rag.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ You can write your own [custom relationship builder]() to establish the relation

```python
from ragas.testset.graph import KnowledgeGraph
from ragas.testset.transforms.relationship_builders.cosine import JaccardSimilarityBuilder
from ragas.testset.transforms.relationship_builders.traditional import JaccardSimilarityBuilder

kg = KnowledgeGraph(nodes=sample_nodes)
rel_builder = JaccardSimilarityBuilder(property_name="entities", key_name="PER", new_property_name="entity_jaccard_similarity")
Expand Down Expand Up @@ -287,4 +287,4 @@ class EntityQuerySynthesizer(QuerySynthesizer):
"""

return SingleTurnSample(user_input=query, reference_contexs=contexts, reference=reference)
```
```

0 comments on commit 9da1ab7

Please sign in to comment.