Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Multi-model sparse search ensembling #990

Open
martin-gaievski opened this issue Nov 16, 2024 · 1 comment
Open

[FEATURE] Multi-model sparse search ensembling #990

martin-gaievski opened this issue Nov 16, 2024 · 1 comment

Comments

@martin-gaievski
Copy link
Member

Add support for ensemble-based neural sparse search that combines results from multiple sparse models to improve search quality and robustness.

Motivation

Research shows that ensemble of sparse retrievers provides:

  • Better generalization across different query types
  • Improved robustness to different document types
  • Better effectiveness-efficiency trade-off

Key research:

Proposed Functionality

Ensemble Configuration

PUT _neural/sparse_model/ensemble
{
  "name": "sparse_ensemble",
  "models": [
    {
      "model_id": "splade_v2",
      "weight": 0.6
    },
    {
      "model_id": "unicoil",
      "weight": 0.4
    }
  ],
  "combination_method": "weighted_sum",  // or "max", "mean"
  "cache_policy": {
    "enabled": true,
    "ttl": "1h"
  }
}

Search API

GET my-index/_search
{
  "query": {
    "neural_sparse_ensemble": {
      "query_text": "search query",
      "ensemble_id": "sparse_ensemble",
      "k": 100
    }
  }
}

As shown in the configuration section, we can use caching to improve remote call latency.

@heemin32
Copy link
Collaborator

Does this imply that only the query embedding varies across models? Shouldn't the index embedding also differ for each model?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants