AutoSelectionScorer#

class langchain_experimental.rl_chain.base.AutoSelectionScorer[source]#

Bases: SelectionScorer[Event], BaseModel

Auto selection scorer.

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 llm_chain: LLMChain [Required]#
param prompt: BasePromptTemplate | None = None#
param scoring_criteria_template_str: str | None = None#
static get_default_prompt() ChatPromptTemplate[source]#
Return type:

ChatPromptTemplate

static get_default_system_prompt() SystemMessagePromptTemplate[source]#
Return type:

SystemMessagePromptTemplate

score_response(inputs: Dict[str, Any], llm_response: str, event: Event) float[source]#
Parameters:
  • inputs (Dict[str, Any]) –

  • llm_response (str) –

  • event (Event) –

Return type:

float