langchain_experimental.rl_chain.pick_best_chain.PickBestFeatureEmbedder¶
- class langchain_experimental.rl_chain.pick_best_chain.PickBestFeatureEmbedder(auto_embed: bool, model: Optional[Any] = None, *args: Any, **kwargs: Any)[source]¶
Text Embedder class that embeds the BasedOn and ToSelectFrom inputs into a format that can be used by the learning policy
- model name
The type of embeddings to be used for feature representation. Defaults to BERT SentenceTransformer.
- Type
Any, optional
Methods
__init__(auto_embed[, model])format(event)format_auto_embed_off(event)Converts the BasedOn and ToSelectFrom into a format that can be used by VW
format_auto_embed_on(event)get_indexed_dot_product(context_emb, action_embs)get_label(event)- format(event: PickBestEvent) str[source]¶
- format_auto_embed_off(event: PickBestEvent) str[source]¶
Converts the BasedOn and ToSelectFrom into a format that can be used by VW
- format_auto_embed_on(event: PickBestEvent) str[source]¶
- get_context_and_action_embeddings(event: PickBestEvent) tuple[source]¶
- get_label(event: PickBestEvent) tuple[source]¶