langchain.chains.llm_summarization_checker.base.LLMSummarizationCheckerChain¶
class langchain.chains.llm_summarization_checker.base.LLMSummarizationCheckerChain[source]¶
Bases: Chain
Chain for question-answering with self-verification.
Example
from langchain.llms import OpenAI
from langchain.chains import LLMSummarizationCheckerChain
llm = OpenAI(temperature=0.0)
checker_chain = LLMSummarizationCheckerChain.from_llm(llm)
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
param are_all_true_prompt: PromptTemplate = PromptTemplate(input_variables=['checked_assertions'], template='Below are some assertions that have been fact checked and are labeled as true or false.\n\nIf all of the assertions are true, return "True". If any of the assertions are false, return "False".\n\nHere are some examples:\n===\n\nChecked Assertions: """\n- The sky is red: False\n- Water is made of lava: False\n- The sun is a star: True\n"""\nResult: False\n\n===\n\nChecked Assertions: """\n- The sky is blue: True\n- Water is wet: True\n- The sun is a star: True\n"""\nResult: True\n\n===\n\nChecked Assertions: """\n- The sky is blue - True\n- Water is made of lava- False\n- The sun is a star - True\n"""\nResult: False\n\n===\n\nChecked Assertions:"""\n{checked_assertions}\n"""\nResult:')¶
[Deprecated]
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated, use callbacks instead.