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

TNID API documentation Company Documents Ask A Question Of The Company's Documents

Ask A Question Of The Company's Documents

On this page

GraphQL endpoint: /company

Answers a natural-language question from the calling company'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!) {
  askCompanyDocumentQuestion(question: $question) {
    answer
    citations {
      id
      fileName
    }
  }
}

Variables

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

Response

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