\documentclass[10pt]{article}
\usepackage[margin=0.8in]{geometry}
\usepackage{amsmath}
\usepackage{hyperref}
\setlength{\parindent}{0pt}
\setlength{\parskip}{0.8\baselineskip}

\title{BetterQuery Intention Bridge\\Technical Summary}
\author{CDLI Lab\\\texttt{research@cdli.ai}}
\date{}

\begin{document}

\maketitle

\section*{Abstract}
BetterQuery improves prompt enhancement by routing each request through an explicit \emph{Intention Bridge} before generation. This reduces ambiguity, enables safer fallbacks, and makes system behavior observable through production telemetry.

\section{What is the Intention Bridge?}
Instead of sending every input directly to an LLM, BetterQuery first:
\begin{enumerate}
\item detects intent using rules and embeddings,
\item optionally resolves ambiguity using a routing model,
\item chooses a specialized skill or falls back safely.
\end{enumerate}

\section{Core Pipeline}
\textbf{request} \(\rightarrow\) sanitize \(\rightarrow\) session context \(\rightarrow\) route \(\rightarrow\) cache \(\rightarrow\) generate (architect + refiner) \(\rightarrow\) quality gate \(\rightarrow\) response + analytics.

\section{Why it works}
\begin{itemize}
\item \textbf{Speed:} two-level cache (exact hash + semantic match).
\item \textbf{Quality:} two-stage generation and gating.
\item \textbf{Reliability:} controlled fallback/degraded modes.
\item \textbf{Measurability:} admin metrics for skill usage, latency, fallback, and activity.
\end{itemize}

\section{What we can prove today}
The system already exposes measurable signals:
\begin{itemize}
\item top skills by usage,
\item fallback and degraded request ratio,
\item average latency,
\item daily active enhancers,
\item explicit quality feedback (rating + thumbs signals).
\end{itemize}

\section{Benchmark plan}
We compare pipeline variants on a fixed benchmark:
\begin{itemize}
\item full system,
\item no LLM arbitration,
\item no cache,
\item one-stage generation.
\end{itemize}

Primary outcomes: intent precision/recall, p50/p95 latency, cost proxy, fallback rate, and human preference agreement.

\section{Conclusion}
BetterQuery’s architecture is strongest as a layered control system: route by intent, generate with skill constraints, gate quality, and learn from telemetry. For further improvement, the highest leverage lies in better routing calibration and richer benchmark discipline.

\end{document}
