stores

Question answering

post/v1/stores/question-answering

Request body

top_kinteger

Number of results to return

file_idsstring[] nullable

Optional list of file IDs to filter chunks by (inclusion filter)

querystring

Question to answer. If not provided, the question will be extracted from the passed messages.

streamboolean

Internal: when set, the response is a server-sent event stream of the retrieved chunks, live trace events, and finally the answer. Used by the Mixedbread playground; not part of the documented public API.

instructionsstring nullable

Additional custom instructions (followed only when not in conflict with existing rules)

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"
      }
    ]
  },
  "file_ids": [
    "123e4567-e89b-12d3-a456-426614174000",
    "123e4567-e89b-12d3-a456-426614174001"
  ],
  "search_options": {
    "rerank": {
      "model": "rerank_model",
      "top_k": 10
    }
  }
}

Response

The answer to the question

answerstring required

The answer generated by the LLM

Example response

{
  "sources": [
    {
      "mime_type": "text/plain",
      "model": "text-embedding-ada-002",
      "score": 0.5,
      "file_id": "file1",
      "filename": "file1",
      "store_id": "store1",
      "external_id": "ext-123",
      "metadata": {
        "key": "value"
      },
      "context": "This chunk is from an SEC filing on ACME corp's Q2 2023 performance.",
      "summary": "A short overview of ACME's Q2 2023 performance."
    }
  ]
}

Changes

Changed in 4 of the 30 revisions of this API.419

  • 957bf8ec8df844See the full diff
    • ▲

      added to the //// response property oneOf list for the response status

      response-property-one-of-added

    • ▲

      added to the //// response property oneOf list for the response status

      response-property-one-of-added

    • ▲

      added to the //// response property oneOf list for the response status

      response-property-one-of-added

    • ▲

      added to the //// response property oneOf list for the response status

      response-property-one-of-added

    • ○

      added csv discriminator mapping keys to the //// response property for the response status

      response-property-discriminator-mapping-added

    • ○

      added csv discriminator mapping keys to the //// response property for the response status

      response-property-discriminator-mapping-added

    • ○

      added csv discriminator mapping keys to the //// response property for the response status

      response-property-discriminator-mapping-added

    • ○

      added csv discriminator mapping keys to the //// response property for the response status

      response-property-discriminator-mapping-added

    • ●

      the request property's max was set to 10000.00

      request-property-max-set

    This revision also has 4 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ○

      added the new optional request property /

      new-optional-request-property

    • ○

      the request property default value changed from mixedbread-ai/mxbai-rerank-v3-listwise to mixedbread-ai/mxbai-rerank-v3.1-listwise

      request-property-default-value-changed

    • ○

      added the optional property /// to the response with the status

      response-optional-property-added

    • ○

      added the optional property /// to the response with the status

      response-optional-property-added

    • ○

      added the optional property /// to the response with the status

      response-optional-property-added

    This revision also has 5 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog