_load_question_to_checked_assertions_chain() — langchain Function Reference
Architecture documentation for the _load_question_to_checked_assertions_chain() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 98907bf7_2811_e9e1_0faa_d8951a890e3a["_load_question_to_checked_assertions_chain()"] a0a672f2_fe43_2701_45f8_1b60a2179f97["base.py"] 98907bf7_2811_e9e1_0faa_d8951a890e3a -->|defined in| a0a672f2_fe43_2701_45f8_1b60a2179f97 f272a350_2fd9_70c0_9de4_c963a07940fa["_raise_deprecation()"] f272a350_2fd9_70c0_9de4_c963a07940fa -->|calls| 98907bf7_2811_e9e1_0faa_d8951a890e3a 62540c68_956e_907e_7735_12e71501527a["from_llm()"] 62540c68_956e_907e_7735_12e71501527a -->|calls| 98907bf7_2811_e9e1_0faa_d8951a890e3a style 98907bf7_2811_e9e1_0faa_d8951a890e3a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/chains/llm_checker/base.py lines 25–63
def _load_question_to_checked_assertions_chain(
llm: BaseLanguageModel,
create_draft_answer_prompt: PromptTemplate,
list_assertions_prompt: PromptTemplate,
check_assertions_prompt: PromptTemplate,
revised_answer_prompt: PromptTemplate,
) -> SequentialChain:
create_draft_answer_chain = LLMChain(
llm=llm,
prompt=create_draft_answer_prompt,
output_key="statement",
)
list_assertions_chain = LLMChain(
llm=llm,
prompt=list_assertions_prompt,
output_key="assertions",
)
check_assertions_chain = LLMChain(
llm=llm,
prompt=check_assertions_prompt,
output_key="checked_assertions",
)
revised_answer_chain = LLMChain(
llm=llm,
prompt=revised_answer_prompt,
output_key="revised_statement",
)
chains = [
create_draft_answer_chain,
list_assertions_chain,
check_assertions_chain,
revised_answer_chain,
]
return SequentialChain(
chains=chains,
input_variables=["question"],
output_variables=["revised_statement"],
verbose=True,
)
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does _load_question_to_checked_assertions_chain() do?
_load_question_to_checked_assertions_chain() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/chains/llm_checker/base.py.
Where is _load_question_to_checked_assertions_chain() defined?
_load_question_to_checked_assertions_chain() is defined in libs/langchain/langchain_classic/chains/llm_checker/base.py at line 25.
What calls _load_question_to_checked_assertions_chain()?
_load_question_to_checked_assertions_chain() is called by 2 function(s): _raise_deprecation, from_llm.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free