Skip to content

Commit

Permalink
added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jjmachan committed Sep 28, 2024
1 parent 9c8cb68 commit ae8a278
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/references/testset_generation.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Testset Generation

::: ragas.experimental.testset.generator.TestsetGenerator
::: ragas.experimental.testset.TestsetGenerator
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ nav:
- references/evaluation.md
- references/metrics.md
- references/run_config.md
- references/testset_generation.md
- ❤️ Community: community/index.md

# Material-Docs Theme
Expand Down
32 changes: 21 additions & 11 deletions src/ragas/experimental/testset/generators/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,27 @@ def generate(
"""
Generate an evaluation dataset based on given scenarios and parameters.
Args:
test_size (int): The number of samples to generate.
scenarios (Optional[QuestionTypes]): A list of tuples containing scenario generators and their probabilities.
If None, default scenarios will be used.
run_config (Optional[RunConfig]): Configuration for running the generation process.
with_debugging_logs (bool): If True, enable debug logging for various components.
raise_exceptions (bool): If True, raise exceptions during the generation process.
Returns:
EvaluationDataset: A dataset containing the generated evaluation samples.
Parameters
----------
test_size : int
The number of samples to generate.
scenarios : Optional[QuestionTypes], optional
A list of tuples containing scenario generators and their probabilities.
If None, default scenarios will be used.
run_config : Optional[RunConfig], optional
Configuration for running the generation process.
with_debugging_logs : bool, default False
If True, enable debug logging for various components.
raise_exceptions : bool, default True
If True, raise exceptions during the generation process.
Returns
-------
EvaluationDataset
A dataset containing the generated evaluation samples.
Notes
-----
This function performs the following steps:
1. Set up scenarios and debug logging if required.
2. Generate scenarios using an Executor.
Expand Down

0 comments on commit ae8a278

Please sign in to comment.