---
title: "Get LlmAssistant job"
method: GET
path: "/llm/llm_assistant/{job_id}"
tags: ["llm"]
---

# Get LlmAssistant job

`GET /llm/llm_assistant/{job_id}`

## Path parameters

- `job_id` string, required

## Response `200`

Successful Response

- LlmAssistantJobRead
  - `job_id` string, required — RQ job ID
  - `job_type` string, required — Type of the job
  - `project_id` integer, required — Project ID associated with the job
  - `status` 'queued' | 'finished' | 'failed' | 'started' | 'deferred' | 'scheduled' | 'stopped' | 'canceled', required
  - `status_message` string, nullable — Status message
  - `current_step` integer, required — Current step in the job process
  - `steps` string[], required — Total number of steps in the job process
  - `input` LLMJobInput, required
    - `project_id` integer, required — Project ID associated with the job
    - `llm_job_type` 'TAGGING' | 'METADATA_EXTRACTION' | 'ANNOTATION' | 'SENTENCE_ANNOTATION', required
    - `specific_task_parameters` union, required — Specific parameters for the LLMJob w.r.t it's type
      - TaggingParams
        - `llm_job_type` 'TAGGING', required
        - `sdoc_ids` integer[], required — IDs of the source documents to analyse
        - `tag_ids` integer[], required — IDs of the tags to use for the document tagging
      - MetadataExtractionParams
        - `llm_job_type` 'METADATA_EXTRACTION', required
        - `sdoc_ids` integer[], required — IDs of the source documents to analyse
        - `project_metadata_ids` integer[], required — IDs of the project metadata to use for the metadata extraction
      - AnnotationParams
        - `llm_job_type` 'ANNOTATION', required
        - `sdoc_ids` integer[], required — IDs of the source documents to analyse
        - `code_ids` integer[], required — IDs of the codes to use for the annotation
        - `delete_existing_annotations` boolean — Delete existing annotations before creating new ones
      - SentenceAnnotationParams
        - `llm_job_type` 'SENTENCE_ANNOTATION', required
        - `sdoc_ids` integer[], required — IDs of the source documents to analyse
        - `code_ids` integer[], required — IDs of the codes to use for the sentence annotation
        - `delete_existing_annotations` boolean — Delete existing annotations before creating new ones
    - `llm_approach_type` 'LLM_ZERO_SHOT' | 'LLM_FEW_SHOT', required
    - `specific_approach_parameters` union, required — Specific parameters for the approach w.r.t it's type
      - ZeroShotParams
        - `llm_approach_type` 'LLM_ZERO_SHOT', required
        - `prompts` LLMPromptTemplates[], required — The prompt templates to use for the job
          - `language` string, required — The language of the prompt template
          - `system_prompt` string, required — The system prompt to use for the job
          - `user_prompt` string, required — The user prompt to use for the job
        - `model` string, required — Large Language Model to use for the job
      - FewShotParams
        - `llm_approach_type` 'LLM_FEW_SHOT', required
        - `prompts` LLMPromptTemplates[], required — The prompt templates to use for the job
          - `language` string, required — The language of the prompt template
          - `system_prompt` string, required — The system prompt to use for the job
          - `user_prompt` string, required — The user prompt to use for the job
        - `model` string, required — Large Language Model to use for the job
  - `output` LLMJobOutput
    - `llm_job_type` 'TAGGING' | 'METADATA_EXTRACTION' | 'ANNOTATION' | 'SENTENCE_ANNOTATION', required
    - `specific_task_result` union, required — Specific result for the LLMJob w.r.t it's type
      - TaggingLLMJobResult
        - `llm_job_type` 'TAGGING', required
        - `results` TaggingResult[], required
          - `status` 'error' | 'finished' | 'partial', required — Status of the Result
          - `status_message` string, required — Status message of the result
          - `sdoc_id` integer, required — ID of the source document
          - `current_tag_ids` integer[], required — IDs of the tags currently assigned to the document
          - `suggested_tag_ids` integer[], required — IDs of the tags suggested by the LLM to assign to the document
          - `reasoning` string, required — Reasoning for the tagging
      - MetadataExtractionLLMJobResult
        - `llm_job_type` 'METADATA_EXTRACTION', required
        - `results` MetadataExtractionResult[], required
          - `status` 'error' | 'finished' | 'partial', required — Status of the Result
          - `status_message` string, required — Status message of the result
          - `sdoc_id` integer, required — ID of the source document
          - `current_metadata` SourceDocumentMetadataReadResolved[], required — Current metadata
            - `int_value` integer, nullable, required — Int Value of the SourceDocumentMetadata
            - `str_value` string, nullable, required — String Value of the SourceDocumentMetadata
            - `boolean_value` boolean, nullable, required — Boolean Value of the SourceDocumentMetadata
            - `date_value` string, date-time, nullable, required — Date Value of the SourceDocumentMetadata
            - `list_value` string[], nullable, required — List Value of the SourceDocumentMetadata
            - `id` integer, required — ID of the SourceDocumentMetadata
            - `source_document_id` integer, required — SourceDocument the SourceDocumentMetadata belongs to
            - `project_metadata` ProjectMetadataRead, required
              - …
          - `suggested_metadata` SourceDocumentMetadataReadResolved[], required — Suggested metadata
            - `int_value` integer, nullable, required — Int Value of the SourceDocumentMetadata
            - `str_value` string, nullable, required — String Value of the SourceDocumentMetadata
            - `boolean_value` boolean, nullable, required — Boolean Value of the SourceDocumentMetadata
            - `date_value` string, date-time, nullable, required — Date Value of the SourceDocumentMetadata
            - `list_value` string[], nullable, required — List Value of the SourceDocumentMetadata
            - `id` integer, required — ID of the SourceDocumentMetadata
            - `source_document_id` integer, required — SourceDocument the SourceDocumentMetadata belongs to
            - `project_metadata` ProjectMetadataRead, required
              - …
      - AnnotationLLMJobResult
        - `llm_job_type` 'ANNOTATION', required
        - `results` AnnotationResult[], required
          - `status` 'error' | 'finished' | 'partial', required — Status of the Result
          - `status_message` string, required — Status message of the result
          - `sdoc_id` integer, required — ID of the source document
          - `suggested_annotations` SpanAnnotationRead[], required — Suggested annotations
            - `begin` integer, required — Begin of the SpanAnnotation in characters
            - `end` integer, required — End of the SpanAnnotation in characters
            - `begin_token` integer, required — Begin of the SpanAnnotation in tokens
            - `end_token` integer, required — End of the SpanAnnotation in tokens
            - `id` integer, required — ID of the SpanAnnotation
            - `text` string, required — The SpanText the SpanAnnotation spans.
            - `code_id` integer, required — Code the SpanAnnotation refers to
            - `user_id` integer, required — User the SpanAnnotation belongs to
            - `sdoc_id` integer, required — SourceDocument the SpanAnnotation refers to
            - `created` string, date-time, required — Created timestamp of the SpanAnnotation
            - `updated` string, date-time, required — Updated timestamp of the SpanAnnotation
            - `group_ids` integer[], required — The group ids this span annotations belongs to
            - `memo_ids` integer[], required — Memo IDs attached to the SpanAnnotation
          - `raw_response` string, nullable — Raw LLM response (only set if no annotations were suggested or an error occurred)
      - SentenceAnnotationLLMJobResult
        - `llm_job_type` 'SENTENCE_ANNOTATION', required
        - `results` SentenceAnnotationResult[], required
          - `status` 'error' | 'finished' | 'partial', required — Status of the Result
          - `status_message` string, required — Status message of the result
          - `sdoc_id` integer, required — ID of the source document
          - `suggested_annotations` SentenceAnnotationRead[], required — Suggested annotations
            - `sentence_id_start` integer, required — Start sentence ID of the SentenceAnnotation
            - `sentence_id_end` integer, required — End sentence ID of the SentenceAnnotation
            - `id` integer, required — ID of the SentenceAnnotation
            - `code_id` integer, required — Code the SentenceAnnotation refers to
            - `user_id` integer, required — User that created the SentenceAnnotation
            - `sdoc_id` integer, required — SourceDocument the SentenceAnnotation refers to
            - `created` string, date-time, required — Created timestamp of the SentenceAnnotation
            - `updated` string, date-time, required — Updated timestamp of the SentenceAnnotation
            - `memo_ids` integer[], required — Memo IDs attached to the SentenceAnnotation
          - `raw_response` string, nullable — Raw LLM response (only set if no annotations were suggested or an error occurred)
  - `created` string, date-time, required — Created timestamp of the job
  - `finished` string, date-time, nullable — Finished timestamp of the job

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/uhh-lt/apis/discourse-analysis-tool-suite-api.md) · [All operations](https://skmtc.net/uhh-lt/apis/discourse-analysis-tool-suite-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/uhh-lt/discourse-analysis-tool-suite-api/versions/6b22366ce2d1/schema)
