
\newlength{\colDist}
\newlength{\rowSpace}
\setlength{\colDist}{2cm}
\setlength{\rowSpace}{0.8cm}


\begin{tikzpicture}[
    node distance=\rowSpace and \colDist,
    % Styles
    stage/.style={rectangle, draw, fill=blue!5, text width=2cm, align=center, minimum height=0.6cm, font=\small},
    engine/.style={diamond, draw, fill=orange!10, text width=1cm, aspect=2, align=center, inner sep=0pt, font=\scriptsize},
    output/.style={rectangle, rounded corners, draw, fill=green!5, text width=2cm, align=center, font=\small},
    header/.style={font=\footnotesize\bfseries, gray},
    arrow/.style={-Stealth, thick, gray!80}
]

% --- HEADER DEFINITION (Die Ankerpunkte) ---
\node[header] (h1) {1. Input Type};
\node[header, right=\colDist of h1] (h2) {2. Prompting};
\node[header, right=\colDist of h2] (h3) {3. Strategy};
%\node[header, right=\colDist of h3] (h4) {4. Inference};
\node[header, right=2*\colDist of h3] (h5) {5. Output};

% --- SPALTE 1: Input (Hängt an h1) ---
\node[stage, below=0.3cm of h1] (raw) {Raw Text};
\node[stage, below=\rowSpace of raw] (simp) {Simplified Text};
\node[stage, below=\rowSpace of simp] (trans) {Translation};

% --- SPALTE 2: Prompting (Hängt an h2) ---
\node[stage, below=0.3cm of h2] (zero) {Zero-Shot};
\node[stage, below=\rowSpace of zero] (few) {Few-Shot};

% --- SPALTE 3: Strategy (Hängt an h3) ---
\node[stage, below=0.3cm of h3] (dni) {\textbf{DNI}};
\node[stage, below=\rowSpace of dni] (tbi_syl) {\textbf{TBI-SYL}};
\node[stage, below=\rowSpace of tbi_syl] (tbi_fol) {\textbf{TBI-FOL}};

% --- SPALTE 4: Inference (Hängt an h4) ---
% Positionierung auf Höhe der TBI-Strategien
\node[engine, right= .6\colSpace of tbi_fol] (otter) {Otter\\Prover};
\node[engine, right= .6\colSpace of tbi_syl] (prolog) {Prolog\\KB};

% --- SPALTE 5: Output (Hängt an h5) ---
\node[output, below= 1.5 *  \rowSpace of h5] (val) {Validity Label};
\node[output, below= \rowSpace of val] (prem) {Relevant Premises};

% --- VERBINDUNGEN (Pfeile) ---

% DNI Path (Baseline)
\draw[arrow] (raw) -- (zero);
\draw[arrow] (zero) -- (dni);
\draw[arrow] (dni) -- (val);

% LTI Paths (FOL & SYL)
\draw[arrow] (raw) -- (few);
\draw[arrow] (simp) -- (few);
\draw[arrow] (trans) -- (few);
\draw[arrow] (few) -- (tbi_fol);
\draw[arrow] (few) -- (tbi_syl.west);

% To Inference
\draw[arrow] (tbi_fol) -- (otter);
\draw[arrow] (tbi_syl) -- (prolog);

% To Outputs
\draw[arrow] (otter) -- (val.west);
\draw[arrow] (prolog.east) -- (val.west);
\draw[arrow] (otter.east) -- (prem);

% Hilfs-Pfeil Prep
\draw[dashed, ->, gray] (raw) -- (simp);
\draw[dashed, ->, gray] (raw) to [bend left] (trans);
\end{tikzpicture}
