Skip to content

feat: add retry mechanism to question generators#2227

Open
majiayu000 wants to merge 1 commit intoGiskard-AI:mainfrom
majiayu000:feat/retry-question-generation
Open

feat: add retry mechanism to question generators#2227
majiayu000 wants to merge 1 commit intoGiskard-AI:mainfrom
majiayu000:feat/retry-question-generation

Conversation

@majiayu000
Copy link

Summary

  • Add num_retries parameter to _LLMBasedQuestionGenerator (default: 2)
  • Retry question generation on failures before skipping

Fixes #2141

Add num_retries parameter to _LLMBasedQuestionGenerator with default
value of 2. When question generation fails (e.g., due to LLM errors
or JSON parsing issues), the generator will retry up to num_retries
times before skipping the question.

Fixes Giskard-AI#2141

Signed-off-by: majiayu000 <1835304752@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

No retry on failed generations, which leads to errors. For example, key-getters on generated questions and answers, are not always present.

1 participant