---
title: "ADR-002: Feature Services Architecture"
manual: "TYPO3 LLM Extension"
version: "0.35"
permalink: "https://docs.typo3.org/permalink/netresearch/nr-llm:adr-002@0.35"
source: "Adr/Adr002FeatureServicesArchitecture.rst"
modified: "2026-09-16T22:09:16+00:00"
---

# ADR-002: Feature Services Architecture

-   *Status:* Accepted
-   *Date:* 2024-02
-   *Authors:* Netresearch DTT GmbH

## Context

Common LLM tasks (translation, image analysis, embeddings) require:

-   Specialized prompts and configurations
-   Pre/post-processing logic
-   Caching strategies
-   Quality control measures

## Decision

Create **dedicated Feature Services** for high-level operations:

-   `CompletionService`: Text generation with format control.
-   `EmbeddingService`: Vector operations with caching.
-   `VisionService`: Image analysis with specialized prompts.
-   `TranslationService`: Language translation with quality scoring.

Each service:

-   Uses `LlmServiceManager` internally.
-   Provides domain-specific methods.
-   Handles caching and optimization.
-   Returns typed response objects.

## Consequences

**Positive:**

-   ●● Clear separation of concerns.
-   ● Reusable, tested implementations.
-   ●● Consistent behavior across use cases.
-   ● Built-in best practices (caching, prompts).

**Negative:**

-   ◑ Additional classes to maintain.
-   ◑ Potential duplication with manager methods.
-   ◑ Learning curve for service selection.

**Net Score:** +6.5 (Strong positive impact - services
provide high-level abstractions with best practices)
