Mixedbread
Search

Question Answering

Question Answering turns your store into an AI-powered knowledge base.
Instead of returning raw content like search, it generates complete answers based on the retrieved context.

Basic Question Answering

Ask questions and get augmented answers based on your Store content:

Question Answering
from mixedbread import Mixedbread

mxbai = Mixedbread(api_key="YOUR_API_KEY")

response = mxbai.stores.question_answering(
    store_identifiers=["my-knowledge-base"],
    query="What are the main features of the product?",
    top_k=5,
    qa_options={"cite": True, "multimodal": True},
)

print(response)

Multimodal support enables:

  • Image understanding: Answers based on diagrams, charts, and visuals
  • OCR text: Extracted text from images contributes to answers

Defaults and configuration

By default, Question Answering uses citations and multimodal context.
To change behavior, pass qa_options explicitly.

Disable citations and multimodal
from mixedbread import Mixedbread

mxbai = Mixedbread(api_key="YOUR_API_KEY")

response = mxbai.stores.question_answering(
    store_identifiers=["my-knowledge-base"],
    query="What were the key decisions made last quarter?",
    top_k=5,
    qa_options={"cite": False, "multimodal": False},
)

print(response)

Example Response

QA Response
JSON
{
  "answer": "Based on the provided source, the key decision made last quarter involved finalizing the budget for Project Alpha <cite i=\"0\"/>.",
  "sources": [
    {
      "chunk_index": 2,
      "mime_type": "text/plain",
      "model": "mxbai-omni",
      "score": 0.92,
      "file_id": "your_file_id_1",
      "filename": "meeting_notes_q1.docx",
      "store_id": "my-knowledge-base",
      "metadata": {},
      "type": "text",
      "text": "In the Q1 board meeting, we agreed to finalize the budget for Project Alpha with a total allocation of $2.5M..."
    }
  ]
}
  • Answer: AI-generated answer. May include citation tags like <cite i="0"/>.
  • Sources: Context used for the answer. Each entry includes:
    • chunk_index, score, file_id, filename
    • Content fields: text, image_url, with optional ocr_text
    • Use indices from <cite i="n"/> to map to sources[n]
Last updated: January 7, 2026