stores

Question answering

Changed on
post/v1/stores/question-answering

Request

  • Base URL
    https://api.mixedbread.com
  • URL
    https://api.mixedbread.com/v1/stores/question-answering
  • Auth
    HTTP bearer

Request body

top_kinteger

Number of results to return

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"
      }
    ]
  },
  "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"
      },
      "file_url": "https://storage.mixedbread.com/org1/files/file1.pdf?X-Amz-Signature=...",
      "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