---
title: "Get prediction results"
method: GET
path: "/ai/async-prediction/{PREDICTION_ID}"
tags: ["Fetch predictions"]
---

# Get prediction results

`GET /ai/async-prediction/{PREDICTION_ID}`

Fetch the results of a prediction task by its ID.

## Response `200`

OK

- union
  - FaqEnrichmentResponse
    - `predictions` FaqEnrichmentResponseTokens[]
      - `faqPairs` object[] — A list of question and answer pairs returned from the FAQ enrichment request.
        - `question` string, required — The frequently asked question.
        - `answer` string, required — The answer corresponding to the question.
      - `tokensUsed` Token
        - `promptTokens` integer — The number of tokens generated to prompt the model to continue generating results.
        - `completionTokens` integer — The number of tokens used until the model completes.
        - `totalTokens` integer — The sum of the prompt and completion tokens used in the model.
  - PassthroughResponse
    - `predictions` PassthroughResponseTokens[]
      - `response` string — The results returned from the request.
      - `tokensUsed` Token
        - `promptTokens` integer — The number of tokens generated to prompt the model to continue generating results.
        - `completionTokens` integer — The number of tokens used until the model completes.
        - `totalTokens` integer — The sum of the prompt and completion tokens used in the model.
  - RagExtDocResponse
    - `predictions` RagExtDocResponseTokens[]
      - `response` string — The unparsed response returned from the request.
      - `tokensUsed` Token
        - `promptTokens` integer — The number of tokens generated to prompt the model to continue generating results.
        - `completionTokens` integer — The number of tokens used until the model completes.
        - `totalTokens` integer — The sum of the prompt and completion tokens used in the model.
      - `answer` string — The parsed response text from the document.
      - `sources` string[] — One or more URLs that identify the source of the document returned in the response.
      - `memoryUuid` string — The universal unique identifier (UUID) stored in the trained set of data in the model that is used in the model request. This parameter is optional, and is used when previous chat history reference information is available.
      - `answerNotFoundMessage` string — This parameter is optional, and can be passed to change the response if the LLM cannot answer the request. The default is "Not possible to answer given this content."
      - `answerFound` boolean — This parameter is false if the value in the answerNotFoundMessage field is used in the response. If an answer is returned for the request, this parameter is true.
  - StandaloneResponse
    - `predictions` StandaloneResponseTokens[]
      - `response` string — The results returned from the request.
      - `tokensUsed` Token
        - `promptTokens` integer — The number of tokens generated to prompt the model to continue generating results.
        - `completionTokens` integer — The number of tokens used until the model completes.
        - `totalTokens` integer — The sum of the prompt and completion tokens used in the model.
  - SummarizationResponse
    - `predictions` SummarizationResponseTokens[]
      - `tokensUsed` Token
        - `promptTokens` integer — The number of tokens generated to prompt the model to continue generating results.
        - `completionTokens` integer — The number of tokens used until the model completes.
        - `totalTokens` integer — The sum of the prompt and completion tokens used in the model.
      - `response` string — The results returned from the request.
  - KeywordExtractionResponse
    - `predictions` KeywordExtractionResponseTokens[]
      - `response` string — The results returned from the request.
      - `tokensUsed` Token
        - `promptTokens` integer — The number of tokens generated to prompt the model to continue generating results.
        - `completionTokens` integer — The number of tokens used until the model completes.
        - `totalTokens` integer — The sum of the prompt and completion tokens used in the model.
      - `keywords` unknown[] — Keywords derived from the response. The number of keywords is limited to the `maxKeywords` field in the request.
        - unknown
  - NerResponse
    - `predictions` NerResponseTokens[]
      - `tokensUsed` Token
        - `promptTokens` integer — The number of tokens generated to prompt the model to continue generating results.
        - `completionTokens` integer — The number of tokens used until the model completes.
        - `totalTokens` integer — The sum of the prompt and completion tokens used in the model.
      - `entities` object
        - `entity` string[] — The result of the requested entity type that was a key with a list of example values to search. For example: { "Location": [ "Porbandar", "India", "South Africa" ] }
      - `response` string — The results returned from the request.

## Other responses

- `4XX` — The error varies based on the issue encountered regarding the `chunkingId` or related information.

---

[API](https://skmtc.dev/lucidworks/apis/rules-rewrites-api.md) · [All operations](https://skmtc.dev/lucidworks/apis/rules-rewrites-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/lucidworks/rules-rewrites-api/revisions/f2d3747848e8/schema)
