Glean cuts decision latency by using a model that chooses, not writes

Chinmay Goyal shows how Glean uses a decision model for routing, suggestions, citation checks and security.

CGChinmay Goyal연사 · Glean
채널
AI Engineer
게시일
2026년 11월 27일
영상
16:04
읽기
6분
슬라이드
6
원문
영어
YouTube에서 열기
스크롤하면 영상이 오른쪽 아래로 작아져 계속 재생됩니다. 자막은 읽기 언어를 따릅니다.
읽기 언어2개 언어로 읽을 수 있음
이 글은 아직 한국어 번역이 없어 영어 원문으로 표시합니다.
요약

30초 요약

Many steps in an AI product choose among known options rather than generate prose. Glean engineer Chinmay Goyal says replacing general-purpose language models with Jev, TypeSafe’s decision model, made expert routing about eight times faster and raised on-time follow-up suggestions from about 90% to 99.2%. In a separate security test, first-pass recall rose from 31.5% to 90.2%. He recommends testing a decision model when outputs can be listed in advance, while retaining generative models for open-ended text and considering fine-tuning when labels are stable.

  1. 1Many AI product steps are choices rather than writingGoyal lists query classification, expert routing and citation checks as bounded decisions. Jev produces a choice rather than free-form text, and its labels can be changed through the request without retraining.
  2. 2A no-training classifier approached a fine-tuned modelOn Glean’s query-classification test, Jev reached about 90% of the fine-tuned model’s agreement and nearly doubled the base model’s. The comparison avoids repeated training when the taxonomy changes.
  3. 3Expert routing became about eight times fasterIn Glean’s experiment, Jev had high precision and roughly eightfold lower routing latency than a general-purpose LLM. Goyal says the infrastructure changes were substantial, but worth the latency reduction.
  4. 4More suggestions arrived on time, with no invalid decisionsThe proportion arriving within the time budget rose from about 90% to 99.2%. Goyal reports zero invalid outputs in the Jev test, compared with roughly 90% valid suggestions from the LLM.
  5. 5Citation checks became more repeatableAcross repeated checks on about 28–30 cases, Goyal says Jev changed its answer in only one. This lets Glean spend less time rerunning evaluation on the same inputs.
  6. 6The security filter caught more cases in its first passOn Glean’s internal guardrail datasets, first-pass recall rose from 31.5% to 90.2% after replacing its old classifier. The slide reports precision changed from 92.7% to 90.8%.

핵심 정리

  1. Separate fixed-choice decisions from tasks that actually require new text.
  2. Compare decision models with fine-tuned classifiers when labels are stable and volume is high.
  3. Measure deadline compliance and invalid outputs as well as decision quality for user-facing ranking.
  4. Evaluate security filters on recall and precision together, and account for hosting and maintenance costs.
  5. Use model-generated scores to adjust decision thresholds to each deployment.
전문

챕터별로 다듬은 전문 읽기

원본 자막만 보기
01

Why a fixed choice does not need a text generator

Goyal separates bounded decisions from open-ended generation and compares Jev with general models and fine-tuned classifiers. Changing a set of labels can be a prompt change rather than a retraining exercise.

I work on Glean Assistant as a product engineer. Many steps in an AI product are bounded decisions: classify a user’s intent, pick a suggestion from a list, check a citation, or route a query to an expert. Historically, we have paid the cost and waited for a general language model to answer these questions.

At Glean we use Jev, a decision model from TypeSafe, between general-purpose language models and fine-tuned classifiers. We have also tried an open model such as Llama and a fine-tuned version. A general LLM can generate prose but brings cost and latency; Jev chooses from options rather than producing generated text.

The categories we need to choose between can change. With a fine-tuned model, that can mean collecting and cleaning data and retraining; with Jev, we can change the prompt or options. Each approach has its own tradeoffs.

02

Evaluate changes before customer rollout

Glean uses reference evaluation sets, internal testing and customer A/B tests. Its first example compares query-classification quality against base and fine-tuned models.

We have millions of users, so we do not want a change to make the product worse. We maintain reference evaluation sets for areas that use generative AI or other intelligence. Changes then run internally in our own Glean instance for a couple of weeks, with feedback from employees, before customer A/B testing.

Our first example is query classification: identifying what kind of work users are asking Glean to help with. If more queries concern sales or engineering, that informs where we focus. We compared an open Llama model, Jev and a Llama model fine-tuned on our own compute.

Query-classification agreement
슬라이드 1 / 6Query-classification agreementThe slide compares the base, zero-shot and fine-tuned classifiers against production LLM labels.

In our test, Jev was our best option without training. Its agreement with production LLM labels was 66.8%, compared with 35.9% for the base model and 74.5% for the fine-tuned model. That is close to 90% of the fine-tuned model’s agreement, without the data preparation, training and hosting work.

03

Route each query to an expert faster

Glean tested Jev against a general-purpose LLM for expert routing. Goyal reports a large latency reduction and says it justified the integration complexity.

Next is expert routing. When a query arrives, Glean decides which expert should answer it. We previously used a general-purpose language model for that choice. In a test with multiple experts, Jev had high precision and reduced the routing call’s latency by roughly a factor of eight.

Expert routing precision and latency
슬라이드 2 / 6Expert routing precision and latencyResults by route show the median speedup for requests sent to an expert, along with an integration tradeoff.

Integrating Jev into this stage required substantial changes to our implementation and infrastructure. We generally try to keep systems simple, but judged that this latency improvement justified the extra complexity.

04

Deliver follow-up suggestions on time

A ranking stage selects among suggestions from multiple sources. Its deadline and valid-output checks make latency and constrained outputs important.

We also rank follow-up suggestions, which help users discover what they can ask next. Our internal system, Q, receives candidates from roughly 10 to 15 independent sources. Language models generate the candidate queries, and the ranker selects using those candidates, the original question and Glean’s answer as context.

A suggestion is useful only if it arrives promptly: we cannot show an answer and then make someone wait five seconds for a follow-up. We set a time limit of roughly 1.5 to 2 seconds for this step. Jev improved both quality and latency compared with the general-purpose LLM.

Suggestion ranking in production
슬라이드 3 / 6Suggestion ranking in productionThe comparison shows ranker latency, timeout rate, suggestion coverage and invalid decisions.

In that comparison, we delivered a suggestion within the time limit in 99.2% of cases, versus about 90% with the LLM. The slide also shows fewer suggestion-engine timeouts and more turns on which a suggestion appeared.

We apply checks to catch output errors. With the general model, roughly 90% of suggestions were valid; some answers used the wrong language or failed programmatic criteria. We saw no invalid outputs with Jev in the comparison. The prompts differed somewhat, though we tried to keep them as similar as possible.

The ranker also gives scores for its possible outputs instead of only a yes-or-no answer. We can tune thresholds for a particular deployment. A self-learning system adjusts them based on how a customer uses Glean, rather than applying one threshold everywhere.

05

Check citations with a repeatable judge

Glean tests whether cited documents support an answer’s claims. More consistent decisions reduce the need to repeat identical evaluations.

We use models as judges in our development pipeline as well. A judge examines an input and output and assesses quality. Because an LLM’s answers vary, we normally repeat evaluations to account for that variability.

One evaluation asks whether the document cited by a Glean answer actually supports its claim. This is a bounded yes-or-no question. Jev lowered latency and cost in our comparison and was more consistent across repeated runs than the general model used for comparison.

Citation judge repeatability
슬라이드 4 / 6Citation judge repeatabilityThe slide compares time, cost and changes in verdict across three runs; it labels these as judge scores rather than accuracy.

Goyal says that across approximately 28 to 30 cases, Jev changed its judgment in only one. The slide specifies one of 28 paragraphs across three identical runs; it distinguishes repeatability of judge scores from accuracy. Repeating fewer identical checks saves time when an evaluation contains thousands of entries.

Faster development evaluations can improve the rate at which engineers ship changes. I see the benefit as more than a single product improvement: saving time in a pipeline used by hundreds of engineers can compound across many future changes.

06

Catch more security violations in the first pass

A lightweight first stage flags items for a heavier model. Glean replaced per-customer classifiers and measured changes in recall, precision and resource cost.

Security checks are another use. We check inputs and outputs from tools and models in two phases: a first pass designed for high recall, followed by a heavier LLM for flagged cases. These calls run in parallel with the actual tool input and output calls.

Previously, we hosted a classifier on T4 GPUs for each customer. Glean uses separate deployments and resources per customer, so maintaining that classifier at scale meant maintaining many copies. Replacing it with Jev reduced that operational work.

Security filter recall and precision
슬라이드 5 / 6Security filter recall and precisionThe first-pass guardrail comparison breaks recall down by category and shows overall precision and resource costs.

On our internal guardrail datasets, the first-pass classifier’s overall recall rose from 31.5% to 90.2% with Jev. The slide gives precision of 92.7% for the previous classifier and 90.8% for Jev. It also shows internal resource spending falling from $4,000 to $2,100 a month, before counting engineering time.

We no longer need two or three engineers working full time on maintaining those classifiers and GPUs across customer deployments. Counting the engineering work as well as resource costs, I estimate savings exceed 50%.

07

Choose a model based on the output

Goyal recommends a decision model when the available outputs can be listed ahead of time. Free text and stable high-volume labels may call for a generator, fine-tuned classifier or hybrid.

When to use a decision model
슬라이드 6 / 6When to use a decision modelThe decision tree separates fixed outputs, stable high-volume labels and requests that also need generated text.

The rule we use is to ask whether all possible outputs can be listed in advance. If not, use a model capable of free-form generation. If they can, test a decision model. When labels are stable and volume is high, also consider a fine-tuned classifier; when labels change frequently, a model whose options can be edited is useful.

For a task that needs both a decision and dynamic text, a hybrid can use the decision model to choose a tool and a language model to write the arguments. Goyal points to a blog post with the detailed results and invites further questions.

같은 채널의 다른 글

슬라이드 6장20:05EN
AI Engineer· 2026년 11월 27일Michelle Chen: Why Cloudflare Started Training Small AI ModelsMichelle Chen · CloudflareCloudflare's small decision and extraction models can reduce the work sent to large language models, Chen says, as a build-triage demo shows.AI agents모델과 학습AI cost & performance+1
슬라이드 3장19:26EN
AI Engineer· 2026년 11월 26일Jason Liu: Own the Work AI Helps You CreateJason Liu · OpenAIUse the time AI saves to sharpen your judgment, explore other disciplines and take responsibility for what you ship.Human-AI CollaborationCreativityDeveloper productivity+2
슬라이드 3장18:03EN
AI Engineer· 2026년 11월 26일Justin McCarthy: Automate Existing Software, Discover New DemandJustin McCarthy · DiffusionKeep proven products fast and safe with continuous feedback, then use the freed capacity to find what customers will actually buy.소프트웨어 팩토리코딩 에이전트Product-Market Fit+2
슬라이드 6장18:43EN
AI Engineer· 2026년 11월 25일Lance Martin: 1,000 Agents Coordinate a Formal ProofLance Martin · AnthropicA lead agent built its own coordination system; separate memory experiments show how reflection can repair mistakes.AI agents에이전트 엔지니어링AI research+1
슬라이드 4장18:01EN
AI Engineer· 2026년 11월 25일Quinn Slack: How Amp Built a Company Around AgentsQuinn Slack · AmpA year without hiring pushed Amp to ship in small steps, put customer work in agent threads and give 21 people broad ownership.AI 엔지니어링 리더십코딩 에이전트Startups+2
슬라이드 3장22:29EN
AI Engineer· 2026년 11월 24일Jarred Sumner: Independent Tests Made Millions of Agent-Written Lines ShippableJarred Sumner · AnthropicBun’s creator explains why existing tests, three-way comparisons and repeated measurement mattered more than code volume.코딩 에이전트개발 워크플로와 테스트Software engineering+1