QuestionGeneratorChain Class — langchain Architecture
Architecture documentation for the QuestionGeneratorChain class in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD c67ceace_d96a_acd7_994d_55c9d0939c8f["QuestionGeneratorChain"] ccf50fe1_4990_cf19_1e2d_25efe83f53c5["LLMChain"] c67ceace_d96a_acd7_994d_55c9d0939c8f -->|extends| ccf50fe1_4990_cf19_1e2d_25efe83f53c5 4c01b940_b202_29af_2ff5_d0dfa5e5e804["base.py"] c67ceace_d96a_acd7_994d_55c9d0939c8f -->|defined in| 4c01b940_b202_29af_2ff5_d0dfa5e5e804 6a4daf80_4124_cad2_7781_e4567c89432f["is_lc_serializable()"] c67ceace_d96a_acd7_994d_55c9d0939c8f -->|method| 6a4daf80_4124_cad2_7781_e4567c89432f 8c50a119_1cd3_4545_73b7_ce942f876b6a["input_keys()"] c67ceace_d96a_acd7_994d_55c9d0939c8f -->|method| 8c50a119_1cd3_4545_73b7_ce942f876b6a
Relationship Graph
Source Code
libs/langchain/langchain_classic/chains/flare/base.py lines 41–55
class QuestionGeneratorChain(LLMChain):
"""Chain that generates questions from uncertain spans."""
prompt: BasePromptTemplate = QUESTION_GENERATOR_PROMPT
"""Prompt template for the chain."""
@classmethod
@override
def is_lc_serializable(cls) -> bool:
return False
@property
def input_keys(self) -> list[str]:
"""Input keys for the chain."""
return ["user_input", "context", "response"]
Extends
Source
Frequently Asked Questions
What is the QuestionGeneratorChain class?
QuestionGeneratorChain is a class in the langchain codebase, defined in libs/langchain/langchain_classic/chains/flare/base.py.
Where is QuestionGeneratorChain defined?
QuestionGeneratorChain is defined in libs/langchain/langchain_classic/chains/flare/base.py at line 41.
What does QuestionGeneratorChain extend?
QuestionGeneratorChain extends LLMChain.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free