-
Notifications
You must be signed in to change notification settings - Fork 852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: implement TestsetGenerator
#1375
Merged
jjmachan
merged 32 commits into
explodinggradients:main
from
jjmachan:feat/putting-together
Sep 28, 2024
Merged
feat: implement TestsetGenerator
#1375
jjmachan
merged 32 commits into
explodinggradients:main
from
jjmachan:feat/putting-together
Sep 28, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
now things to do before pre-release
|
shahules786
reviewed
Sep 28, 2024
shahules786
approved these changes
Sep 28, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Putting everything together
Summary from Github CoPilot
This pull request introduces several changes to the
ragas
project, focusing on improvements to the test set generation and integration with Langfuse. The changes include new utility functions, updates to class structures, and enhancements to documentation.Enhancements to Test Set Generation:
src/ragas/experimental/testset/generators/abstract.py
: RefactoredAbstractQAScenario
toAbstractQuestionScenario
and added several methods for generating scenarios and samples, including handling cases with no clusters. [1] [2] [3] [4] [5] [6] [7] [8]src/ragas/experimental/testset/generators/generator.py
: Introduced theTestsetGenerator
class with methods to generate evaluation datasets using Langchain documents and custom scenarios.src/ragas/experimental/testset/generators/utils.py
: Addedcalculate_split_values
utility function to help in splitting scenarios based on probabilities.Documentation and Configuration Updates:
docs/references/testset_generation.md
: Added new documentation for test set generation.mkdocs.yml
: Updated navigation to include the new test set generation documentation.Codebase Simplification and Refactoring:
src/ragas/experimental/testset/generators/abstract.py
: Simplified thegenerate_scenarios
method and added handling for empty clusters.src/ragas/experimental/testset/generators/base.py
: Removed redundant abstract methods and added a new abstract methodgenerate_sample
.src/ragas/experimental/testset/transforms/__init__.py
: Consolidated imports and added adefault_transforms
function to define default transformation sequences.Integration with Langfuse:
docs/howtos/integrations/langfuse.ipynb
: Minor formatting improvements for better readability.These changes collectively enhance the functionality and maintainability of the test set generation process, improve documentation, and ensure better integration with external libraries like Langfuse.finish prompt object