langchain.chains.llm_checker.base.LLMCheckerChain¶
class langchain.chains.llm_checker.base.LLMCheckerChain[source]¶
Bases: Chain
Chain for question-answering with self-verification.
Example
from langchain.llms import OpenAI
from langchain.chains import LLMCheckerChain
llm = OpenAI(temperature=0.7)
checker_chain = LLMCheckerChain.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 callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated, use callbacks instead.
param callbacks: Callbacks = None¶
Optional list of callback handlers (or callback manager). Defaults to None.
Callback handlers are called throughout the lifecycle of a call to a chain,
starting with on_chain_start, ending with on_chain_end or on_chain_error.
Each custom chain can optionally call additional callback methods, see Callback docs
for full details.
param check_assertions_prompt: PromptTemplate = PromptTemplate(input_variables=['assertions'], template='Here is a bullet point list of assertions:\n{assertions}\nFor each assertion, determine whether it is true or false. If it is false, explain why.\n\n')¶
[Deprecated]
param create_draft_answer_prompt: PromptTemplate = PromptTemplate(input_variables=['question'], template='{question}\n\n')¶
[Deprecated]
param list_assertions_prompt: PromptTemplate = PromptTemplate(input_variables=['statement'], template='Here is a statement:\n{statement}\nMake a bullet point list of the assumptions you made when producing the above statement.\n\n')¶
[Deprecated]
param llm: Optional[BaseLanguageModel] = None¶
[Deprecated] LLM wrapper to use.