TSGGLOBAL Support sign in
Skip to page content
Browse TNID API docs

TNID API documentation User Documents Ask A Question Of Your Documents

Ask A Question Of Your Documents

On this page

GraphQL endpoint: /user

Answers a natural-language question from the calling user's documents and names the documents the answer drew on. Only accepted documents are searched, and only the passages that matched are sent to the model.

The answer shown here comes from a stubbed model, so the wording is illustrative rather than something the service guarantees.

Query

mutation ($question: String!) {
  askUserDocumentQuestion(question: $question) {
    answer
    citations {
      id
      fileName
    }
  }
}

Variables

{
  "question": "when does my tv warranty end"
}

Response

{
  "data": {
    "askUserDocumentQuestion": {
      "answer": "Your TV warranty ends on 2027-01-01.",
      "citations": [
        {
          "fileName": "tv-warranty.pdf",
          "id": "00000000-0000-4000-8000-000000000001"
        }
      ]
    }
  }
}