# Stop Paying LLM Prices for Yes-or-No Answers — Chinmay Goyal, Glean

Chinmay Goyal, Glean

[Talk page](https://ai.engineer/talks/K5_ST-kMrvY-stop-paying-llm-prices-yes-no-answers) · [Video](https://www.youtube.com/watch?v=K5_ST-kMrvY)

## Stop Paying LLM Prices for Yes-or-No Answers

Glean Assistant writes answers, picks experts, ranks follow-up questions, and checks citations. Chinmay Goyal shows what changed when Glean moved bounded decisions to TypeSafe’s Jev, from faster expert routing to higher recall in the first security pass.

### What does this model call need to return?

[0:12](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=12s)

Before an expert can answer a question in Glean Assistant, the product has to pick which expert gets it. Glean was paying the cost and latency of a general-purpose LLM to choose from a list. Chinmay Goyal, a software engineer on Glean Assistant, starts with several decisions of this kind. An intent classifier chooses a category, a ranker picks a suggestion, and a citation check returns a verdict. [Watch from 0:35](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=35s).

Glean tried general-purpose LLMs, base open models, fine-tuned models, and TypeSafe’s **Jev**. Jev returns a structured decision over supplied options. When Glean needs to revise the categories the model can choose from, it can edit the prompt. Maintaining a fine-tuned classifier can mean preparing data and training it again every time those categories change.

### Golden evaluations, an internal soak, then customer A/B testing

[2:21](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=141s)

Golden evaluation sets give Glean reference cases for spotting regressions in nearly every part of the product that uses a model or other automated judgment. A change then runs for roughly two weeks in Glean’s own instance, at a company of about 1,500 people at the time of the talk. The team uses feedback from internal users to revise the change before A/B testing it with customers.

### How close can query classification get without fine-tuning?

[3:18](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=198s)

Glean first tried a decision model to classify what users were asking about. The labels help the product team understand which jobs people use Glean for. A high share of sales queries gives the team a reason to invest in sales workflows. A high share of engineering queries points it toward a different set of needs.

The test bed compared a base open model, Jev, and the same open model fine-tuned on Glean’s own compute. Jev delivered nearly twice the base model’s reported quality and about 90% of the fine-tuned model’s quality. Those figures are relative to the other models on this test bed, with the quality metric unspecified. [Watch the comparison at 3:46](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=226s).

Fine-tuning delivered the highest score in this comparison. It also meant collecting and cleaning data, paying for training compute, revisiting that work as labels changed, and hosting and serving the classifier. Jev got close enough to the fine-tuned result for Goyal to favor it among the options Glean could use without running its own training.

![Bar chart of agreement with production LLM labels. Base Laya reached 35.9%, zero-shot Jev reached 66.8%, and fine-tuned Laya reached 74.5%. Jev achieved about 90% of fine-tuned Laya’s agreement without task-specific training.](https://ai.engineer/api/talk-essay-media/9e83313d6097be8fc3c2b2056d566bbac2e9175a85035b23f64923d8632a9fbc)

On Glean’s test set, zero-shot Jev reached about 90% of the fine-tuned model’s agreement with the production labels. The fine-tuned model still scored higher.

### A faster router was worth changing the infrastructure

[4:38](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=278s)

The expert router takes an incoming query and picks the expert that will answer it. Glean set up a test bed with a pool of experts and compared Jev with its general-purpose LLM router. Goyal reports high routing precision with Jev and says the decision took about one-eighth as long as it had with the previous router.

Integrating Jev into this stage required significant changes to Glean’s implementation and infrastructure. Glean usually favors a simpler system. Here, every bit of time saved in routing comes before the selected expert can start work, and the team judged that gain worth the added complexity.

![Grouped bars show Jev improving precision across three expert routes and the no-expert route. The slide reports an 8.1× median call speedup for requests routed to an expert and notes that Jev adds a blocking call when a transfer is unnecessary.](https://ai.engineer/api/talk-essay-media/eb9c4c89bd7e7ad45df0139297e8ce560d84f6be6fd674cae71a59e365d74de6)

The blue bars show precision by expert. The separate 8.1× figure measures routing speed, a different reason to switch models.

### Q generates follow-ups, then picks one on a deadline

[5:43](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=343s)

A good follow-up anticipates the user’s next question or shows them something else they can do with Glean. The system that produces it is called `Q`. Roughly 10 to 15 sources independently generate suggestions as natural-language queries. The ranker gets those candidates along with the original query and Glean’s answer. Each candidate is a possible output. The original exchange gives the ranker the context to judge which one fits. [Watch Q’s inputs at 6:11](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=371s).

A suggestion that appears five seconds after the answer misses the experience Glean wanted. The step had a budget of roughly 1.5 to 2 seconds. Goyal reports better ranking quality with Jev without specifying a quality metric. Glean measured two concrete ways the step could fail.

- **On-time delivery.** Glean returned a suggestion within the time limit in 99.2% of cases with Jev, up from about 90% with the general-purpose LLM.

- **Output validity.** Glean logs when its programmatic checks fire. The general-purpose LLM returned a valid suggestion in about 90% of cases. It sometimes answered in a different language or failed another check. Jev chooses from the supplied suggestions, leaving the writing to the generators. Glean observed zero invalid outputs with Jev in this comparison. The team used slightly different prompts and matched them as closely as it could.

With five candidates, Jev returns five probabilities. A candidate can rank first and still fall below a cutoff, so the scores let Glean decide whether the winner is strong enough to show. Glean automatically tunes thresholds for each customer deployment based on how that customer uses the product. The feedback signal and update rule are unspecified.

What reaches Q’s ranker before it chooses a follow-up?
The generators supply the text Jev can choose from. The query and answer supply context for ranking those choices. The scores give Glean a way to apply a cutoff to the result.
- Independent generators — Roughly 10 to 15 sources produce natural-language follow-up candidates.
- Original user query — The question that began the exchange.
- Glean’s answer — The response Glean gave to the original query.
- Jev ranker — Compares the supplied options in the context of the exchange.
- Preferred candidate and scores — Glean can use the per-option probabilities to apply a threshold.
- Independent generators → Jev ranker (Candidate text)
- Original user query → Jev ranker (Query context)
- Glean’s answer → Jev ranker (Answer context)
- Jev ranker → Preferred candidate and scores (Choice and per-option probabilities)

### More repeatable verdicts for citation checks

[9:47](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=587s)

A citation gives the reader a document they can check against a claim. Glean’s evaluation pipeline asks the same question automatically. Given a claim in the answer and its cited document, does the document support the claim? With a general-purpose LLM as judge, Glean would repeat the check because the same pair could produce different verdicts.

Moving the yes-or-no verdict to Jev cut the latency and cost of running the check. It also made the verdicts more repeatable. In a comparison covering roughly 28 to 30 cases, Goyal reports one run in which Jev gave a different response. That result describes repeatability on the cases tested. Agreement with human judgments is a separate measure. [Watch the citation results at 11:04](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=664s).

Scale the evaluation to thousands of claim-and-document pairs and there are two sources of savings. Each verdict takes less time, and more repeatable verdicts reduce the need to run the same pair again. Shorter evaluation runs give engineers feedback sooner, which is how a change to one judge can speed up work elsewhere in the product.

![Jev took 6.6 seconds to check citations. Luna took 81.3–85.5 seconds without reasoning. Across three identical runs, Jev changed its verdict on one of 28 paragraphs and Luna without reasoning changed seven.](https://ai.engineer/api/talk-essay-media/8351d0106447d3697b816fca4b3d0d825b9c6c778e40045dc26a49f3789e890e)

When Glean ran the same citation judgments again, Jev changed one of 28 verdicts. The table on the left compares time and cost for the three judges.

### Catching more cases in the first security pass

[12:33](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=753s)

Glean checks inputs and outputs from tools and LLMs. Its security checks have two stages. The first prioritizes recall, the share of actual positives it catches. A heavier LLM handles the final judgment. The checks run alongside the tool calls.

The first-stage classifier ran on T4 GPUs. Glean’s single-tenant setup gives each customer its own instance and resources, so engineers had to maintain the classifier across separate deployments. Goyal uses a hypothetical 1,000 customers to show how the work scales. That would mean maintaining classifiers across 1,000 deployments.

Replacing the first-stage classifier with Jev raised recall from 31.5% to 90.2%. The first pass went from catching roughly a third of actual positives to catching nine in ten. The result is scoped to first-stage recall. The false-positive rate and the performance of the full two-stage check remain unquantified. [Watch the recall comparison at 13:47](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=827s).

Glean also reported lower resource costs. The engineering savings came from shedding the recurring work of maintaining the classifiers and T4 GPUs across deployments. Goyal describes that maintenance as work for roughly two or three full-time engineers.

### Can the output be listed in advance?

[14:25](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=865s)

Glean’s closing test applies to the individual call. Can you list its possible outputs before it runs? A candidate list can change with every request and still qualify, as long as the list is ready when the decision model receives it. [Watch the decision rule at 14:46](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=886s).

- **Free-form text.** Use a generative model when the call has to write a response whose possible outputs you can’t list in advance.

- **A list of choices.** Use a promptable decision model such as Jev. When the labels change, editing the prompt lets you update the options without another training run.

- **Stable labels at high volume.** Consider fine-tuning. If the same categories will serve many requests, it is easier to justify the up-front work of preparing data and training the classifier.

A single feature can use both kinds of model. In `Q`, the generators write follow-ups for the current exchange. The ranker receives those freshly written candidates, the query, and the answer, and makes a bounded choice.

## Key takeaways

- Give each decision its own success measure. Q tracks deadline misses and invalid outputs separately. The citation check measures repeatability, and the first security pass measures how many actual positives it catches.
- Count the work around the model. Changing labels can trigger retraining, variable verdicts can trigger repeat calls, and a dedicated classifier can multiply maintenance across customer deployments.

## Slides

### Beyond Generation

[0:30](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=30s) [Blue Glean title slide subtitled “Fast, structured AI decisions with Jev at Glean.” It credits Chinmay Goyal, software engineer at Glean.](https://assets.ai.engineer/sites/aiecode2025/sha256/83d406691f3ffd61ee67aa2242e7301576888ac13413b764134a2b0a51566a54.webp)

### Bounded decisions in AI products

[0:37](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=37s) [Five cards illustrate understanding a request, picking a suggestion, checking citations, routing to a tool or model, and applying a guardrail. A banner says that outputs can be listed in advance even though selecting them often incurs full LLM latency and cost.](https://assets.ai.engineer/sites/aiecode2025/sha256/4d07e61b3c8dad57dffdd79d879157ffbd9dc6e3e749d4e1a298c9ceb164a7b9.webp)

### Jev, general-purpose LLMs, and classifiers

[1:05](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=65s) [Four columns compare a general-purpose LLM, an open zero-shot classifier, a fine-tuned classifier, and Jev. The highlighted Jev column describes zero-shot flexibility through a hosted API and lists the absence of generated text as a tradeoff.](https://assets.ai.engineer/sites/aiecode2025/sha256/27a150b0654fe98d6f587bfe9da9aba62a7314f21f05d357c4c7ef607a9b229f.webp)

### What we tested at Glean

[2:07](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=127s) [Blue Glean slide listing five decisions tested against existing baselines: query classification, model routing, suggestion ranking, citation judging, and guardrails.](https://assets.ai.engineer/sites/aiecode2025/sha256/4e182e1baf4afc1f9a25be232933846c86132eb2e2159341708af9845074e98f.webp)

### We evaluate in stages before anything reaches users

[2:19](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=139s) [Five ascending cards show evaluation moving closer to users through agreement with production, golden-set replay, repeatability runs, adjudication of disagreements, and a live experiment with separate arms.](https://assets.ai.engineer/sites/aiecode2025/sha256/9df73f3a0393436c2a65472b6dd3d4dc1ef77912d5464b5799bd3429d8a95c85.webp)

### Query classification results

[3:20](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=200s) [Bar chart of agreement with production LLM labels. Base Laya reached 35.9%, zero-shot Jev reached 66.8%, and fine-tuned Laya reached 74.5%. Jev achieved about 90% of fine-tuned Laya’s agreement without task-specific training.](https://assets.ai.engineer/sites/aiecode2025/sha256/9e83313d6097be8fc3c2b2056d566bbac2e9175a85035b23f64923d8632a9fbc.webp)

### Zero-shot query classification with Jev

[3:53](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=233s) [Bar chart showing agreement with production LLM labels of 35.9% for base Laya, 66.8% for zero-shot Jev, and 74.5% for fine-tuned Laya. Jev reaches about 90% of fine-tuned Laya’s agreement without task-specific training.](https://assets.ai.engineer/sites/aiecode2025/sha256/4e4df28d6f1f28f34f7e85f8560820a63758f00a38cf998793bfa65edcecb5d6.webp)

### Expert routing precision and latency with Jev

[4:35](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=275s) [Grouped bars show Jev improving precision across three expert routes and the no-expert route. The slide reports an 8.1× median call speedup for requests routed to an expert and notes that Jev adds a blocking call when a transfer is unnecessary.](https://assets.ai.engineer/sites/aiecode2025/sha256/eb9c4c89bd7e7ad45df0139297e8ce560d84f6be6fd674cae71a59e365d74de6.webp)

### One Choice call made suggestion ranking 7× faster

[5:45](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=345s) [Production latency chart shows median ranker latency falling from 4.67 to 0.67 seconds with Jev. Suggestion-engine timeouts fell from 10.2% to 0.8%, turns with a suggestion rose from 83% to 91%, and invalid ranker decisions fell from 10 to zero.](https://assets.ai.engineer/sites/aiecode2025/sha256/e1f31d3bfae321f4319d4b9dc460650a9c9a49765b7dc776b871d7ea0a6c8f66.webp)

### Confidence scores let the system decide when not to decide

[8:53](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=533s) [Two bar charts illustrate a 0.50 cutoff. The system abstains when the highest score is 0.49 and shows a query suggestion when its score reaches 0.67.](https://assets.ai.engineer/sites/aiecode2025/sha256/c2a52395b3002a69ac1cb576eb55251f1d515ee0d24933e8465eadeb660fe3a4.webp)

### Citation checking was about 12× faster and more repeatable

[9:44](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=584s) [Jev took 6.6 seconds to check citations. Luna took 81.3–85.5 seconds without reasoning. Across three identical runs, Jev changed its verdict on one of 28 paragraphs and Luna without reasoning changed seven.](https://assets.ai.engineer/sites/aiecode2025/sha256/8351d0106447d3697b816fca4b3d0d825b9c6c778e40045dc26a49f3789e890e.webp)

## Full transcript

[0:01](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=1s) [music]

[0:12](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=12s) Hi everyone. Uh my name is Chennme and I

[0:16](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=16s) am a software engineer at lean. I work

[0:19](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=19s) on the product engineering side of clean

[0:21](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=21s) assistant.

[0:23](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=23s) Today I'm going to give a talk on how

[0:26](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=26s) lean uses chef. The title of the talk is

[0:29](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=29s) beyond generation fast and structured AI

[0:32](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=32s) decisions with jet clean.

[0:35](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=35s) If you look at it, most AI product steps

[0:38](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=38s) are bounded decisions and not generation

[0:41](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=41s) problems. So to give a couple of

[0:43](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=43s) examples,

[0:44](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=44s) user query intent classification, a

[0:47](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=47s) ranker picking a suggestion out of n

[0:49](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=49s) options, checking whether a citation is

[0:51](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=51s) valid or not, routing to the correct

[0:54](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=54s) model or expert, so on so forth. Till

[0:57](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=57s) now we have been paying the full LM cost

[1:01](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=61s) and latency to get an answer to all

[1:03](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=63s) these bounded problems.

[1:07](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=67s) Jeff at Glean fills the gap between

[1:10](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=70s) general LLMs and fine-tuned classifiers.

[1:14](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=74s) Classification itself isn't a new

[1:15](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=75s) problem like people have been trying to

[1:17](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=77s) solve it uh since forever. We can have

[1:20](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=80s) multiple ways to solve it. Some of the

[1:21](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=81s) things that we have tried out include

[1:24](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=84s) using a general purpose LLM

[1:26](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=86s) using an open model something like LA

[1:29](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=89s) fine-tuning that open model or using

[1:32](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=92s) Jeff.

[1:34](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=94s) Now all these approaches and all these

[1:36](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=96s) uh different ways have their pros and

[1:38](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=98s) cons. With a general purpose LLM

[1:41](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=101s) we incur a lot of cost and latency while

[1:44](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=104s) with something like Jev we get no

[1:45](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=105s) generated text output.

[1:48](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=108s) Another advantage that we have been

[1:50](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=110s) seeing with Jev is that as the taxonomy

[1:52](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=112s) of the decision space changes we don't

[1:54](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=114s) have to fine-tune these models again and

[1:56](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=116s) again. We can just change our prompt a

[1:59](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=119s) bit and boom it works out of the box.

[2:05](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=125s) Now I'll walk you through how we have

[2:08](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=128s) integrated gen or these classification

[2:11](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=131s) uh pro how we have used jevid glean to

[2:14](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=134s) solve these classification problem

[2:15](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=135s) statements. I'll go into some of these

[2:17](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=137s) problems in great detail.

[2:21](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=141s) Before we go into these uh individual

[2:24](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=144s) problems I wanted to touch upon how we

[2:26](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=146s) evaluate these changes. Like we have a

[2:28](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=148s) huge customer base having millions of

[2:30](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=150s) users. So we don't want any of the

[2:32](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=152s) change that we make to regress our

[2:34](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=154s) product. We have a multi-phase approach

[2:37](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=157s) a rollout approach to any change that we

[2:39](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=159s) are making. Uh this includes having a

[2:42](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=162s) golden eval set for almost every

[2:44](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=164s) possible thing like any place where we

[2:46](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=166s) have generative AI. Any place where we

[2:48](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=168s) have any form of intelligence involved

[2:51](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=171s) we have a golden eval set for that

[2:53](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=173s) space. We soak all of these changes for

[2:56](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=176s) a significant amount of time for our

[2:58](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=178s) internal use case. like we have around

[2:59](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=179s) 1500 people at Glean right now. We soak

[3:02](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=182s) all of these changes within our Glean

[3:05](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=185s) instance for like couple of weeks. We

[3:06](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=186s) get active feedback. We have a very

[3:08](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=188s) active feedback loop from our internal

[3:10](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=190s) users. We work upon that and then we go

[3:12](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=192s) for an AB testing

[3:15](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=195s) uh with our customers.

[3:18](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=198s) The first problem that we tried out with

[3:20](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=200s) a decision pro uh decision model was

[3:22](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=202s) query classification.

[3:25](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=205s) Query classification is when we want to

[3:27](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=207s) know the nature of user queries. This

[3:29](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=209s) helps us realize what kind of query what

[3:32](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=212s) kind of uh jobs are people using glean

[3:35](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=215s) for. What kind of say for example if

[3:37](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=217s) people are using more for sales like

[3:39](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=219s) queries we focus more on that. If people

[3:41](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=221s) are using more for engineering type use

[3:42](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=222s) cases we focus more on that. We tried

[3:45](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=225s) out three different approaches over here

[3:46](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=226s) and this is uh data from our test bed.

[3:50](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=230s) Uh we used an open source layer model.

[3:53](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=233s) Then we tried out Jev and then we

[3:55](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=235s) fine-tuned the liar model on our own

[3:57](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=237s) compute resources.

[4:01](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=241s) Jev is the best no training option in

[4:03](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=243s) our opinion. It nearly doubles the

[4:05](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=245s) output quality of a base layer model and

[4:08](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=248s) is 90 is able to perform at 90% quality

[4:11](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=251s) in comparison to a fine-tuned model

[4:13](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=253s) fine-tuned layer.

[4:15](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=255s) With Jeff, we don't have to go through

[4:17](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=257s) the very tedious process of data

[4:20](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=260s) collection, data cleaning, incurring the

[4:23](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=263s) cost for compute, like training the

[4:25](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=265s) model, fine-tuning the model again and

[4:27](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=267s) again as the taxonomy changes. And at

[4:30](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=270s) the same time, we don't have to worry

[4:31](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=271s) about hosting the model or uh incurring

[4:33](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=273s) the inference cost.

[4:38](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=278s) The next problem we went to is expert

[4:40](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=280s) routing. This is a pretty problem common

[4:41](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=281s) problem statement in the industry right

[4:43](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=283s) now like hey when the user query comes

[4:45](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=285s) in what expert do we route it to like

[4:47](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=287s) how do we ensure that the user uh user

[4:50](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=290s) the response to the user is of the best

[4:52](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=292s) possible quality. Glean receives the way

[4:54](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=294s) we have been solving this is glean

[4:56](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=296s) receives the user query and then decides

[4:58](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=298s) what's the best expert to answer the

[5:00](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=300s) query. Till now we have been using a

[5:02](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=302s) general purpose LLM to route to the

[5:03](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=303s) correct expert. We set up a test bed uh

[5:06](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=306s) for Jev. We set up a test bed with n

[5:08](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=308s) experts and in our experiments found a

[5:11](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=311s) significantly high precision when using

[5:12](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=312s) jev and that to add an almost 8x

[5:15](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=315s) reduction in latency.

[5:18](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=318s) We had to change our implementation or

[5:20](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=320s) our infrastructure significantly to

[5:23](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=323s) integrate je into this specific stage of

[5:25](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=325s) our product. But the reduction in

[5:28](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=328s) latency justifies that inherent

[5:31](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=331s) complexity in the system. We at Glean

[5:33](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=333s) have been trying to build systems in the

[5:35](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=335s) most in the simplest possible manners.

[5:37](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=337s) This is one of the rare pieces where we

[5:39](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=339s) believe complexity is worth it.

[5:43](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=343s) Next, I'll walk you through the ranker

[5:46](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=346s) problem statement that I talked about.

[5:49](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=349s) When we receive a user query, we also

[5:52](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=352s) want to generate the best follow-up

[5:53](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=353s) suggestions for the user. Like this

[5:55](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=355s) helps us in getting discoverability for

[5:57](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=357s) our product. This helps us in ensuring

[5:58](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=358s) that the user has the best possible

[5:59](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=359s) experience. We also want to

[6:02](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=362s) recommend or say preempt what the next

[6:04](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=364s) user query might be. Again, a pretty pro

[6:07](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=367s) common problem statement that the entire

[6:08](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=368s) industry has been trying to solve for.

[6:10](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=370s) Internally, we call this system Q. Like

[6:15](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=375s) Q as in the literal Q. The way this

[6:18](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=378s) works, we have like 10 or 15 different

[6:21](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=381s) sources or 10 or 15 different ways uh 10

[6:24](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=384s) or 15 different sources that are

[6:26](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=386s) generating suggestions independently of

[6:27](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=387s) each other.

[6:28](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=388s) Once those suggest these suggestions are

[6:30](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=390s) generated by natural language LLMs and

[6:33](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=393s) it's like a proper natural language

[6:35](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=395s) query. Once these suggestions are in we

[6:38](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=398s) have a ranking step. So the ranker takes

[6:40](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=400s) in all these suggestions takes in the

[6:42](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=402s) you uh the first user query takes in the

[6:44](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=404s) output uh that glean gave and then all

[6:47](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=407s) these suggestions in that context. The

[6:50](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=410s) ranker is then asked to decide like hey

[6:51](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=411s) you have these suggestions what do you

[6:53](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=413s) think is the best one? A pretty

[6:55](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=415s) interesting bottleneck that we had over

[6:57](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=417s) here is we want the response to be

[6:58](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=418s) snappy. I cannot we cannot have a state

[7:01](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=421s) where we give the textual response to

[7:04](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=424s) the user and then wait 5 seconds for

[7:06](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=426s) generating the follow-up suggestion. We

[7:08](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=428s) have to be snappy. That's why we have

[7:11](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=431s) time limits on these suggestions. So

[7:13](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=433s) right now this step had a time limit of

[7:14](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=434s) 1 1.5 to 2 seconds.

[7:17](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=437s) Jeff no doubt gave us a better quality

[7:19](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=439s) than better quality and far better

[7:20](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=440s) latency than what we had with a general

[7:23](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=443s) purpose LLM. But two things stood out

[7:26](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=446s) over there. First, we were able to give

[7:29](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=449s) a suggestion within our time bounds in

[7:32](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=452s) 99.2%

[7:34](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=454s) cases. With the general purpose LLM,

[7:36](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=456s) this was almost 90%. So this ensures

[7:40](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=460s) that we have user engagement and far

[7:43](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=463s) more user queries. Now the second thing

[7:46](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=466s) is at the glean whenever we use these

[7:50](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=470s) LLMs we have guardrails. Guardrails in

[7:52](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=472s) the sense that hey LLM might not be good

[7:54](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=474s) at generating a response or LLM might be

[7:56](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=476s) making some specific kind of mistakes.

[7:58](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=478s) So we have checks and balances for all

[8:01](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=481s) those possible mistakes that we see. We

[8:03](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=483s) keep a log of like we keep a log of all

[8:05](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=485s) these checks that are incurred at any

[8:08](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=488s) point of time. with a general purpose

[8:10](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=490s) LLM we were able to generate a valid

[8:14](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=494s) suggestion in almost 90% of the use uh

[8:16](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=496s) 90% of the cases we still had some

[8:18](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=498s) places where LLM was either generating a

[8:20](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=500s) langu generating a response in a

[8:22](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=502s) different language uh the output did not

[8:26](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=506s) uh meet certain other criterias that we

[8:28](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=508s) had uh that we had written

[8:30](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=510s) programmatically with Jev we found zero

[8:33](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=513s) cases to be there when the output was

[8:36](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=516s) invalid now a natural question is like

[8:38](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=518s) hey but you have used a different

[8:40](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=520s) prompt. Yes, the prompt was somewhat

[8:41](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=521s) different, but we tried to mimic the

[8:43](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=523s) prompt in the two cases to the largest

[8:45](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=525s) extent possible so that we don't have a

[8:46](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=526s) divergence. Like again, we at Glean want

[8:48](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=528s) to keep the system as simple as

[8:50](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=530s) possible.

[8:53](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=533s) Another benefit we see with using a

[8:56](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=536s) decision model is how we can control the

[8:58](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=538s) thresholds because in this ranker

[9:01](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=541s) problem statement we are getting

[9:03](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=543s) specific probabilities of each output.

[9:05](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=545s) We are not restricted to a binary yes or

[9:07](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=547s) no response. We get like hey these were

[9:09](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=549s) the five options and these are the

[9:11](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=551s) probabilities of these five options.

[9:13](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=553s) With this we are able to fine-tune the

[9:15](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=555s) thresholds based on the deployment. We

[9:18](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=558s) have put in self-arning systems which

[9:20](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=560s) based on the user based on the customer

[9:23](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=563s) deployment and the uh nature of usage

[9:26](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=566s) that the specific customer has

[9:28](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=568s) fine-tunes the thresholds by itself.

[9:30](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=570s) This ensures that the experience in each

[9:34](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=574s) and every customer out there is the best

[9:36](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=576s) possible based on how they use glean not

[9:39](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=579s) a general purpose solution that fits

[9:41](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=581s) all.

[9:47](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=587s) Okay, this is an interesting one. Now

[9:49](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=589s) moving on from how we have been making

[9:52](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=592s) the lives or the experience of our end

[9:54](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=594s) users better. We also tried using jev in

[9:58](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=598s) some of the some some other parts of our

[10:00](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=600s) uh development pipeline. One of them was

[10:04](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=604s) how we use LLM as judges like all of us

[10:08](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=608s) have been using LLM as judges for quite

[10:09](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=609s) some time now. There's an input, there's

[10:11](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=611s) an output, and we use an LLM to judge

[10:14](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=614s) how the quality of the output is. Now,

[10:16](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=616s) naturally, whenever we use LLM as a

[10:18](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=618s) judge, we repeat the experiment multiple

[10:20](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=620s) times because to account for the

[10:22](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=622s) variability in the response.

[10:24](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=624s) At Glean, we used Jeff for a very

[10:26](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=626s) specific part of our evaluation

[10:27](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=627s) pipeline.

[10:29](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=629s) Glean responses or like any other AI

[10:31](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=631s) product out there has like citations.

[10:33](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=633s) This is how people trust that Glean

[10:36](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=636s) Glean's answer was correct and it it is

[10:38](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=638s) grounded in the correct document.

[10:40](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=640s) Now these site we hold these citations

[10:43](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=643s) to a very high bar and we have a

[10:45](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=645s) specific part in our evaluation pipeline

[10:48](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=648s) where we check whether the cited

[10:50](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=650s) document really supports the claim made

[10:52](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=652s) in the answer or not. This again seems

[10:55](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=655s) to be a pretty simple yes or no question

[10:57](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=657s) like hey whether the claim is uh

[11:00](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=660s) supported or not with Jev no doubt we

[11:03](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=663s) had a far better latency and cost like

[11:06](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=666s) visible in the slide uh over here. The

[11:10](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=670s) interesting thing we noticed over here

[11:11](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=671s) is how consistent and reproducible Jeff

[11:14](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=674s) results were in comparison to something

[11:16](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=676s) like say Luna in the 28 or 30 use cases

[11:20](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=680s) that we had like only one run had like a

[11:23](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=683s) difference in response.

[11:25](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=685s) Apart from that everything was

[11:27](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=687s) consistent but this ensure this this

[11:29](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=689s) ensures two things for us as engineers

[11:31](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=691s) or us as developers at clean. We are not

[11:34](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=694s) only improving the quality of our

[11:36](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=696s) product or we are not only improving

[11:38](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=698s) glean in a linear fashion anymore. Any

[11:41](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=701s) improvement of this extent in the

[11:43](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=703s) development pipeline leads to an

[11:45](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=705s) exponential increase in how we can

[11:48](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=708s) improve the product. So if I'm if I as a

[11:50](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=710s) developer I'm able to ship things like

[11:52](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=712s) 5x faster like this is a significant

[11:54](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=714s) reduction in latency. Like if I run this

[11:57](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=717s) experiment across thousands and

[11:58](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=718s) thousands of entries, this is a lot of

[12:00](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=720s) time and again I don't have to run the

[12:02](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=722s) same uh input output pair multiple times

[12:05](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=725s) because the result from Java are quite

[12:06](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=726s) consistent. So if I'm able to increase

[12:10](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=730s) my own productivity by like 5x or 6x, I

[12:13](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=733s) can ship 6x times the features to our

[12:15](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=735s) customers. And this happens across like

[12:17](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=737s) 500 engineers or 300 engineers at clean.

[12:20](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=740s) So the impact of a a good decision model

[12:24](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=744s) is no longer linear. it is exponential

[12:27](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=747s) on how we can improve the product.

[12:31](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=751s) Okay.

[12:33](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=753s) Now, moving on from product and uh LLM

[12:36](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=756s) as judges, there's a pretty important

[12:39](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=759s) this this is a pretty important part of

[12:42](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=762s) how we use our customer data. Like

[12:45](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=765s) security is something that all our

[12:47](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=767s) customers expect from us. So, for

[12:49](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=769s) example, we have checks and balances on

[12:52](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=772s) all the inputs and outputs coming from a

[12:54](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=774s) tool. all the inputs and outputs uh from

[12:56](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=776s) an LLM.

[12:58](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=778s) Till now we at glean have like a

[13:00](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=780s) multi-phase approach. There is like

[13:03](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=783s) there are two phases to this. The first

[13:05](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=785s) one is like recall heavy phase and the

[13:07](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=787s) second one is the final heavy loaded

[13:09](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=789s) L&amp;M. All these calls are made in

[13:11](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=791s) parallel to like the actual tool input

[13:13](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=793s) output calls.

[13:16](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=796s) Till now we used to host a virtue

[13:18](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=798s) classifier using T4 GPUs across all our

[13:21](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=801s) customers. So, glean is a single tenant

[13:23](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=803s) solution like we don't use or share

[13:25](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=805s) resources across customers. Every

[13:27](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=807s) customer gets gets its own deployment

[13:29](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=809s) gets its own instance and gets all the

[13:31](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=811s) resources. So assuming we have thousand

[13:35](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=815s) customers out there we had to maintain

[13:37](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=817s) like virtue classifiers across all these

[13:39](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=819s) thousand customers which becomes a

[13:41](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=821s) pretty difficult problem statement in

[13:42](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=822s) itself which takes up a lot of time from

[13:44](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=824s) glean engineers.

[13:46](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=826s) So looking at the results over here the

[13:49](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=829s) overall recall of the first phase where

[13:51](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=831s) we used to have a virtual classifier we

[13:53](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=833s) replace that with jev went from 31.5% to

[13:56](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=836s) 90.2%.

[13:58](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=838s) At the same time we are seeing a

[14:00](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=840s) significant reduction in cost. Now this

[14:02](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=842s) cost is only the resource cost mentioned

[14:04](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=844s) over here but we are also saving cost on

[14:07](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=847s) the engineering resources over here. We

[14:09](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=849s) don't have to invest like two or three

[14:11](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=851s) engineers who are full-time maintaining

[14:13](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=853s) those virtual classifiers or those T4

[14:14](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=854s) GPUs across customers. The the

[14:18](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=858s) improvement or the savings that we have

[14:20](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=860s) are far more than 50%.

[14:25](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=865s) This slide concludes all the results I

[14:27](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=867s) have talked about till now. Jev at Glean

[14:30](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=870s) has been able to influence the product

[14:32](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=872s) experience of the users has been able to

[14:35](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=875s) uh impact how we as developers have been

[14:37](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=877s) working at Glean and most importantly it

[14:40](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=880s) also has a very good positive impact on

[14:42](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=882s) the security that we provide to our

[14:44](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=884s) customers.

[14:45](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=885s) A simple rule that we have been using is

[14:48](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=888s) can the out in conclusion a simple rule

[14:50](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=890s) that we have been using at glean is can

[14:52](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=892s) the output be listed in advance if no

[14:54](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=894s) then it's a free form gener generative

[14:56](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=896s) text problem statement go back to

[14:58](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=898s) something that can generate free form

[14:59](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=899s) text if yes then use jev are labels

[15:03](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=903s) stable and volume high if this is the

[15:05](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=905s) case where the labels are stable which

[15:07](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=907s) is rarely the case anymore uh you can

[15:10](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=910s) also fine-tune a model but if the labels

[15:12](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=912s) change which in my opinion is quite

[15:14](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=914s) frequent these Then again use something

[15:17](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=917s) like jev.

[15:19](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=919s) Obviously if you need dynamic text we

[15:22](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=922s) can like feel free to try out more

[15:24](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=924s) hybrid approaches like jev along with uh

[15:27](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=927s) free form text lns.

[15:31](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=931s) This ends my presentation. So thank you

[15:33](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=933s) everyone for listening. Uh I have added

[15:36](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=936s) uh a blog like a link to the blog post

[15:38](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=938s) where we have posted the exact same

[15:40](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=940s) results in great detail. Uh, feel free

[15:43](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=943s) to catch me on the outside if you have

[15:44](https://www.youtube.com/watch?v=K5_ST-kMrvY&t=944s) more questions. Thank you.
