-
Notifications
You must be signed in to change notification settings - Fork 292
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: add question generator with llamaindex #193
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Args: | ||
num_questions (int): The number of questions to be generated. | ||
directory_path (str): The path to the directory containing the document. | ||
bad_questions (list, optional): A list of custom 'bad' questions to be appended to the generated questions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
For bad_questions
, I feel like could be renamed to 'additional_questions' as I can see users supplying additional specific good or bad questions unless there's a a plan for generator subclasses to use 'bad_questions' in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please rename it to a generator class.
from deepeval.generator import QuestionGenerator
Can you also run black
?
@@ -0,0 +1,68 @@ | |||
import os | |||
from llama_index import SimpleDirectoryReader, ServiceContext |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To manage complex external dependencies, can you please move these inside the QuestionGenerator
abstraction?
Following up - this PR is good to merge in! On my side, I will need to restructure the tests to make them all pass and fix the infrastructure. |
Description
This PR introduces the QuestionGenerator class that leverages the llama_index library to automatically generate questions from a given document. This enhancement aims to streamline the question generation process by utilizing the capabilities of the llama_index and providing an easy-to-use interface for generating questions, including custom 'bad' questions if needed.
Changes
QuestionGenerator Class:
Issue Addressed:
This PR addresses issue #191