parse_lines(text_parser, self.feature_embedder.format(event))
        )
[docs]    def learn(self, event: TEvent) -> None:
        import vowpal_wabbit_next as vw
        vw_ex = self.feature_embedder.format(event)
        text_parser = vw.TextFormatParser(self.workspace)
        multi_ex = parse_lines(text_parser, vw_ex)
        self.workspace.learn_one(multi_ex)
[docs]    def log(self, event: TEvent) -> None:
        if self.vw_logger.logging_enabled():
            vw_ex = self.feature_embedder.format(event)
            self.vw_logger.log(vw_ex)
[docs]    def save(self) -> None:
        self.model_repo.save(self.workspace)
[docs]class Embedder(Generic[TEvent], ABC):
[docs]    def __init__(self, *args: Any, **kwargs: Any):
        pass
[docs]    @abstractmethod
    def format(self, event: TEvent) -> str:
        ...
[docs]class SelectionScorer(Generic[TEvent], ABC, BaseModel):
    """Abstract method to grade the chosen selection or the response of the llm"""
[docs]    @abstractmethod
    def score_response(
        self, inputs: Dict[str, Any], llm_response: str, event: TEvent
    ) -> float:
        ...
[docs]class AutoSelectionScorer(SelectionScorer[Event], BaseModel):
    llm_chain: LLMChain
    prompt: Union[BasePromptTemplate, None] = None
    scoring_criteria_template_str: Optional[str] = None
[docs]    @staticmethod
    def get_default_system_prompt() -> SystemMessagePromptTemplate:
        return SystemMessagePromptTemplate.from_template(