class CrossEncoderRerank#

cross-encoder | Rerank first-stage retrieved paragraphs based on the contextualized similarity of query <-> paragraph.

Pass each pair of query/paragraph through a transformer network simultaneously. The cross-encoder produces a score indicating the contextualized similarity per text pair.

pydantic model PluginConfig#
  • query (Optional[str])

  • top_n_items (int)

  • worker (str)

PluginConfig.plugin_name: ClassVar[str] = 'cross-encoder'#

Used to register and reference the plugin within a query.

field PluginConfig.top_n_items: int = 10#

Amount of fetched items that should get reranked

field PluginConfig.query: Optional[str] = ''#

left side of the text-pair, as used for cross-encoding. Per default fetches to supplied searchbar user-terms

field PluginConfig.worker: str = 'accurate'#

What deployed cross-encoder worker (@transformer-service) should be used