コモディティCPUハードウェア上での低遅延LLMウェブ検索のための三層キャッシュアーキテクチャ
A Three-Layer Caching Architecture for Low-Latency LLM Web Search on Commodity CPU Hardware
August 12, 2026
著者: Ayushman Bhattacharya, Nihal Gazi
cs.AI
要旨
ChatGPT検索、GoogleのAI Overviews、PerplexityなどのAI搭載検索製品は、ライブのWeb検索結果に基づいてLLMが合成した回答を提供する。我々は、自動化されたブラウザエージェントとプロバイダルーティングされたLLM推論を用いるオープンソースの回答エンジンであるOreoLook(旧lixSearch)を開発した。そのローカル検索、キャッシュ、セッション管理、および埋め込みスタックは汎用CPUハードウェア上で動作し、回答合成はリモート推論プロバイダによって実行される。利用が増えるにつれ、セッションは文脈を失い、同等のクエリは冗長な処理を引き起こし、URLはセッションをまたいで繰り返し埋め込まれた。
我々は3層キャッシュアーキテクチャを提示する。(1) Redis内で最近のメッセージのローリングウィンドウを維持し、自動的にハフマン圧縮ディスクアーカイブへオーバーフローするセッションコンテキストウィンドウ、(2) 埋め込みベクトルのコサイン類似度によって言い換えを捕捉し、冗長なLLM呼び出しを排除するセマンティッククエリキャッシュ、(3) セッションをまたいで埋め込み計算を重複排除するURL埋め込みキャッシュである。3つのコンテナ化レプリカにわたって30個のHypercornワーカープロセスを実行する単一の8 vCPU Intel Cascade Lakeサーバ(2 GHz、32 GB RAM)上にデプロイされた評価対象システムは、集計で89.3%のRedisキースペースヒット率、0.1 msの読み取りレイテンシ、わずか1.38 MBのメモリオーバーヘッドを報告した。バックグラウンドのLRU退避デーモンは、アイドル状態のセッションをRedisからディスクへ移行し、必要に応じて再ハイドレートする。これにより、設定された保持ポリシーの下で、会話を数時間後または数日後に再開できる。
English
AI-powered search products such as ChatGPT search, Google's AI Overviews, and Perplexity provide LLM-synthesized answers grounded in live web results. We developed OreoLook (formerly lixSearch), an open-source answer engine using automated browser agents and provider-routed LLM inference. Its local search, caching, session-management, and embedding stack runs on commodity CPU hardware; answer synthesis is performed by a remote inference provider. As usage grew, sessions lost context, equivalent queries triggered redundant work, and URLs were repeatedly embedded across sessions.
We present a three-layer caching architecture: (1) a Session Context Window maintaining a rolling window of recent messages in Redis with automatic overflow to Huffman-compressed disk archives; (2) a Semantic Query Cache catches rephrasings via cosine similarity on embedding vectors, eliminating redundant LLM invocations; and (3) a URL Embedding Cache that deduplicates embedding computations across sessions. Deployed on a single 8-vCPU Intel Cascade Lake server (2 GHz, 32 GB RAM) running 30 Hypercorn worker processes across three containerized replicas, the evaluated system reported an 89.3% aggregate Redis keyspace hit rate with 0.1 ms read latency and just 1.38 MB of memory overhead. A background LRU eviction daemon migrates idle sessions from Redis to disk and re-hydrates them on demand, enabling conversations that can be resumed hours or days later under the configured retention policy.