stores

Enhance a search query

Changed on

Extract metadata filters and ranking preferences from a search query.

post/v1/stores/queries/enhance

Request

  • Base URL
    https://api.mixedbread.com
  • URL
    https://api.mixedbread.com/v1/stores/queries/enhance
  • Auth
    HTTP bearer

Request body

top_kinteger

Number of results to return

instructionsstring nullable

Optional guidance for query enhancement.

Example request

{
  "filters": {
    "all": [
      {
        "key": "price",
        "operator": "gt",
        "value": "100"
      },
      {
        "key": "color",
        "operator": "eq",
        "value": "red"
      }
    ],
    "any": [
      {
        "key": "price",
        "operator": "gt",
        "value": "100"
      },
      {
        "key": "color",
        "operator": "eq",
        "value": "red"
      }
    ],
    "none": [
      {
        "key": "price",
        "operator": "gt",
        "value": "100"
      },
      {
        "key": "color",
        "operator": "eq",
        "value": "red"
      }
    ]
  },
  "query": "This is a sample text input.",
  "search_options": {
    "rerank": {
      "model": "rerank_model",
      "top_k": 10
    }
  }
}

Response

A single enhanced query item

Changes