---
title: "Determines the appropriate approach based on the provided input"
method: POST
path: "/llm/determine_approach"
tags: ["llm"]
---

# Determines the appropriate approach based on the provided input

`POST /llm/determine_approach`

## Request body

- LLMJobParameters
  - `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

## Response `200`

Successful Response

- ApproachRecommendation
  - `recommended_approach` 'LLM_ZERO_SHOT' | 'LLM_FEW_SHOT', required
  - `reasoning` string, required — Reasoning for the recommendation
  - `available_approaches` object, required — Available approaches

## Other responses

- `422` — Validation Error

## Changes

- **2026-07-15** `1af5a8046f20` — 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- **2026-06-29** `ab1f53e958b7` — 2 info
  - added the new optional request property `specific_task_parameters/oneOf[subschema #3: AnnotationParams]/delete_existing_annotations`
  - the `delete_existing_annotations` request property default value changed from `true` to `false`
- **2025-09-05** `d59c807fb985` — 2 info
  - removed the `MODEL_TRAINING` enum value from the `available_approaches/propertyNames/` response property for the response status `200`
  - removed the `MODEL_TRAINING` enum value from the `recommended_approach` response property for the response status `200`
- **2025-08-22** `53e769440a25` — 5 warning, 1 info
  - removed the request property `specific_task_parameters/oneOf[subschema #3: AnnotationParams]/delete_existing_annotations`
  - removed the optional property `detail/items/ctx` from the response with the `422` status
  - removed the optional property `detail/items/input` from the response with the `422` status
  - added the new `MODEL_TRAINING` enum value to the `available_approaches/propertyNames/` response property for the response status `200`
  - …2 more

[Change history](https://skmtc.dev/uhh-lt/apis/discourse-analysis-tool-suite-api/changes/llm/determine_approach/post.md)

---

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