Chain that generates questions from uncertain spans.
| 71 | |
| 72 | |
| 73 | class QuestionGeneratorChain(LLMChain): |
| 74 | """Chain that generates questions from uncertain spans.""" |
| 75 | |
| 76 | prompt: BasePromptTemplate = QUESTION_GENERATOR_PROMPT |
| 77 | """Prompt template for the chain.""" |
| 78 | |
| 79 | @classmethod |
| 80 | def is_lc_serializable(cls) -> bool: |
| 81 | return False |
| 82 | |
| 83 | @property |
| 84 | def input_keys(self) -> List[str]: |
| 85 | """Input keys for the chain.""" |
| 86 | return ["user_input", "context", "response"] |
| 87 | |
| 88 | |
| 89 | def _low_confidence_spans( |