% Retrieval Latency in Hybrid RAG Pipelines — A0 Portrait Poster
% Compile with: pdflatex poster.tex
\documentclass[25pt, a0paper, portrait]{tikzposter}

\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{amsmath}
\usepackage{xcolor}

% ── Color theme ──────────────────────────────────────────────────────
\definecolorpalette{DoanyPalette}{
  \definecolor{colorOne}{HTML}{0D1B2A}   % dark navy
  \definecolor{colorTwo}{HTML}{1B3A5C}   % mid navy
  \definecolor{colorThree}{HTML}{E8A838} % amber accent
}
\definecolorstyle{DoanyStyle}{
  \definecolor{colorOne}{HTML}{0D1B2A}
  \definecolor{colorTwo}{HTML}{1B3A5C}
  \definecolor{colorThree}{HTML}{E8A838}
}{
  \colorlet{backgroundcolor}{white}
  \colorlet{framecolor}{colorOne}
  \colorlet{titlefgcolor}{white}
  \colorlet{titlebgcolor}{colorOne}
  \colorlet{blocktitlebgcolor}{colorTwo}
  \colorlet{blocktitlefgcolor}{white}
  \colorlet{blockbodybgcolor}{white}
  \colorlet{blockbodyfgcolor}{colorOne}
}
\usecolorstyle{DoanyStyle}
\usetheme{Default}
\useblockstyle{Default}

% ── Smaller title spacing ────────────────────────────────────────────
\definetitlestyle{DoanyTitle}{
  width=\textwidth,
  roundedcorners=20,
  linewidth=0pt,
  innersep=18mm,
  titletotopverticalspace=15mm,
  titletoblockverticalspace=20mm
}{
  \begin{scope}[line width=\titlelinewidth, rounded corners=\titleroundedcorners]
    \draw[fill=titlebgcolor]
      (\titleposleft,\titleposbottom) rectangle (\titleposright,\titlepostop);
  \end{scope}
}
\usetitlestyle{DoanyTitle}

% ── Title ────────────────────────────────────────────────────────────
\title{\textbf{Retrieval Latency in Hybrid RAG Pipelines:\\A Comparative Study}}
\author{Alex Chen \quad Priya Nair \quad Marcus Webb}
\institute{doany.ai Research Lab, San Francisco, CA \quad\quad \texttt{alex.chen@doany.ai}}

\begin{document}
\maketitle

% ══════════════════════════════════════════════════════════════════════
% ROW 1: Abstract + Key Result
% ══════════════════════════════════════════════════════════════════════
\begin{columns}
  \column{0.55}
  \block{Abstract}{
    We evaluate retrieval latency across four strategies in a production RAG pipeline
    serving \textbf{12M monthly queries}. Our hybrid approach combining ColBERTv2 dense
    retrieval with BM25 sparse pre-filtering achieves \textbf{p95 latency of 47\,ms} while
    maintaining \textbf{recall@10 of 0.94}---a \textbf{3.2$\times$ latency reduction} over
    na\"ive dense retrieval without sacrificing relevance.
  }

  \column{0.45}
  \block{Key Result}{
    \begin{center}
      \renewcommand{\arraystretch}{1.4}
      \begin{tabular}{@{}lcc@{}}
        \toprule
        & \textbf{Dense-only} & \textbf{Hybrid-seq} \\
        \midrule
        p95 Latency  & 152\,ms & \textbf{47\,ms} \\
        Recall@10    & 0.91    & \textbf{0.94} \\
        Throughput   & 420 QPS & \textbf{1{,}100 QPS} \\
        \bottomrule
      \end{tabular}
    \end{center}
    \vspace{2mm}
    {\large \color{colorThree}\textbf{3.2$\times$ faster \quad|\quad +3\% recall \quad|\quad 2.6$\times$ throughput}}
  }
\end{columns}

% ══════════════════════════════════════════════════════════════════════
% ROW 2: Methods + Pipeline Diagram
% ══════════════════════════════════════════════════════════════════════
\begin{columns}
  \column{0.45}
  \block{Methods}{
    \textbf{Retrieval Strategies Evaluated}
    \begin{enumerate}
      \item \textbf{Dense-only}: ColBERTv2 over FAISS HNSW (768-dim)
      \item \textbf{Sparse-only}: BM25 via Elasticsearch 8.x
      \item \textbf{Hybrid-sequential}: BM25 top-100 $\rightarrow$ ColBERTv2 re-rank
      \item \textbf{Hybrid-parallel}: Dense + Sparse with reciprocal rank fusion
    \end{enumerate}

    \vspace{4mm}
    \textbf{Evaluation Setup}
    \begin{itemize}
      \item Corpus: 2.4M skill documents (avg 1{,}200 tokens)
      \item 15{,}000 production queries (14 days)
      \item 4$\times$ NVIDIA A100 (80\,GB) + 3-node ES cluster
      \item 3{,}200 human-annotated relevance judgments\\(Fleiss' $\kappa = 0.78$)
    \end{itemize}
  }

  \column{0.55}
  \block{Pipeline Architecture}{
    \begin{center}
      \includegraphics[width=0.92\linewidth]{figures/pipeline.png}
    \end{center}
    \vspace{1mm}
    {\small BM25 narrows 2.4M docs to top-100 in $\sim$12\,ms; ColBERTv2 re-ranks in $\sim$18\,ms.}
  }
\end{columns}

% ══════════════════════════════════════════════════════════════════════
% ROW 3: Latency Results + Relevance Trade-off
% ══════════════════════════════════════════════════════════════════════
\begin{columns}
  \column{0.55}
  \block{Results: Latency Comparison}{
    \begin{center}
      \includegraphics[width=0.95\linewidth]{figures/latency_bars.png}
    \end{center}
    \vspace{2mm}
    \begin{center}
      \renewcommand{\arraystretch}{1.3}
      \begin{tabular}{@{}lrrrr@{}}
        \toprule
        \textbf{Strategy} & \textbf{p50} & \textbf{p95} & \textbf{p99} & \textbf{QPS} \\
        \midrule
        Dense-only       &  89 & 152 & 243 &   420 \\
        Sparse-only      &  12 &  28 &  45 & 2{,}800 \\
        Hybrid-sequential&  31 &  \textbf{47} &  68 & 1{,}100 \\
        Hybrid-parallel  &  22 &  41 &  59 & 1{,}450 \\
        \bottomrule
      \end{tabular}
    \end{center}
  }

  \column{0.45}
  \block{Results: Latency--Relevance Trade-off}{
    \begin{center}
      \includegraphics[width=0.95\linewidth]{figures/scatter.png}
    \end{center}
    \vspace{2mm}
    \begin{center}
      \renewcommand{\arraystretch}{1.3}
      \begin{tabular}{@{}lccc@{}}
        \toprule
        \textbf{Strategy} & \textbf{Recall@10} & \textbf{nDCG@10} & \textbf{MRR} \\
        \midrule
        Dense-only        & 0.91 & 0.82 & 0.76 \\
        Sparse-only       & 0.73 & 0.65 & 0.58 \\
        Hybrid-seq        & \textbf{0.94} & \textbf{0.87} & \textbf{0.83} \\
        Hybrid-par        & 0.93 & 0.86 & 0.81 \\
        \bottomrule
      \end{tabular}
    \end{center}
  }
\end{columns}

% ══════════════════════════════════════════════════════════════════════
% ROW 4: Conclusions + References
% ══════════════════════════════════════════════════════════════════════
\begin{columns}
  \column{0.6}
  \block{Conclusions}{
    \begin{enumerate}
      \item \textbf{Hybrid-sequential is optimal}: 3.2$\times$ faster than dense-only
            at p95 (47\,ms vs 152\,ms) with best recall@10 (0.94).
      \item \textbf{BM25 pre-filtering is the key insight}: sparse retrieval as a
            first-pass filter reduces the dense search space by 24{,}000$\times$.
      \item \textbf{Hybrid-parallel yields diminishing returns}: only 6\,ms faster
            at p95, but requires more complex orchestration.
      \item \textbf{In production since March 2026}: end-to-end response time
            reduced from 1.8\,s to 0.9\,s across 12M monthly queries.
    \end{enumerate}
  }

  \column{0.4}
  \block{References}{
    {\small
    \begin{enumerate}
      \item Khattab \& Zaharia. \textit{ColBERT: Efficient and Effective
            Passage Search via Contextualized Late Interaction.} SIGIR 2020.
      \item Robertson \& Zaragoza. \textit{The Probabilistic Relevance
            Framework: BM25 and Beyond.} FnTIR 2009.
      \item Cormack et al. \textit{Reciprocal Rank Fusion Outperforms
            Condorcet and Individual Rank Learning Methods.} SIGIR 2009.
      \item Johnson et al. \textit{Billion-Scale Similarity Search
            with GPUs.} IEEE TBD 2021.
    \end{enumerate}
    }
    \vspace{4mm}
    \textbf{Acknowledgments}\\
    {\small Supported by doany.ai infrastructure team. Compute provided by
    the doany.ai GPU cluster.}
  }
\end{columns}

\end{document}
