Retrieve the answer for a question | Dadosfera AutoDriveDDF API

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Poll for the Answer

After receiving the question_id, call:

GET /dataset/{dataset_id}/ai_question/{question_id}

until the response’s status field becomes "completed" (and an answer field appears).


Example Response (GET …/ai_question/{question_id} – When Completed)

{
  "dataset_id": "c8004e22-87f7-441f-8302-80c934841196",
  "question_id": "04534356-9ee0-431d-8b6e-74c2eed261c2",
  "status": "completed",
  "question_text": "Why do some pipeline jobs fail intermittently?",
  "answer": "Intermittent pipeline failures often occur because:\n1. **Resource contention**: Concurrent jobs may race for limited compute resources, causing timeouts. \n2. **Transient network glitches**: Temporary connectivity drops can interrupt data reads/writes. \n3. **Schema drift**: Downstream tables occasionally change format without immediate schema updates. \n\nTo mitigate these, ensure you set retry logic, increase timeouts, and maintain schema conformity across data sources.",
  "relevant_documents": [
    {
      "page_content": "…When jobs on Kubernetes exceed CPU quotas, they can be evicted and restart. Monitor ‘OOMKilled’ events…",
      "metadata": { "source": "Pipeline_Architecture.md" }
    },
    {
      "page_content": "…Logs from 2025-05-10 show transient network errors between Region A and B causing downstream timeouts…",
      "metadata": { "source": "Incident_Reports/2025-05-10.txt" }
    },
    {
      "page_content": "…Our ETL uses Avro format; when schema evolves unexpectedly, readers may fail without backward compatibility…",
      "metadata": { "source": "Data_Governance.md" }
    }
  ],
  "confidence": 0.91,
  "submitted_at": "2025-06-12T12:00:05.000Z",
  "completed_at": "2025-06-12T12:00:07.345Z"
}
FieldDescription
status"completed" indicates the answer is ready.
question_textEcho of the original question.
answerAI-generated answer (Markdown-formatted) based solely on the provided dataset’s context.
relevant_documentsArray of snippets used as context: each has page_content (excerpt) and metadata.source (file name or identifier).
confidenceOptional numeric score (0.0–1.0) indicating model’s confidence in its response.
submitted_atISO timestamp when the question was first submitted.
completed_atISO timestamp when processing finished (can be used to measure latency).

Error Responses

CodeReasonWhen it happensExample Body
400Bad RequestMissing required fields (question/model/fetch_k/k).{ "detail": "Field 'question' is required." }
401UnauthorizedMissing / invalid Basic Auth credentials
404Not FoundDataset not found (invalid dataset_id){ "detail": "Dataset not found." }
422Unprocessable EntityDataset exists but is not yet ready to answer (e.g., still processing).{ "detail": "Dataset is not available for querying yet." }
500Internal Server ErrorAI model error or unexpected failure during answer generation{ "detail": "Failed to generate AI answer. Please try again." }
Path Params
string
required
string
required
Responses

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json