newsfilter
← Interviews
AI Engineer16 min

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

Chinmay Goyal

Conference Presentation, Lecture
  • Glean has transitioned from general-purpose LLMs for bounded decision problems to using "GEV" (Gen-V) decision models to reduce cost and latency while maintaining or improving output quality.
  • Bounded decision problems addressed include query intent classification, suggestion ranking, citation validity checks, and expert routing.
  • The speaker notes that general-purpose LLMs incur high costs and latency for non-generative tasks, whereas "GIF" (likely a reference to a specific fine-tuned or rule-based approach) offers zero generation latency but lacks flexibility when decision taxonomies change.
  • GEV allows for immediate adaptation to changing decision taxonomies via prompt updates without requiring retraining or re-fine-tuning.

Evaluation and Rollout Strategy

  • Glean employs a multi-phase rollout process involving a "golden eval set" for every AI/LLM component.
  • Changes are soaked for approximately two weeks using internal feedback from ~1,500 employees before proceeding to customer A/B testing.

Query Classification Results

  • Testing compared open-source Llama, fine-tuned Llama, and GEV.
  • GEV achieved approximately 90% quality parity with fine-tuned models without incurring training, data cleaning, or hosting costs.
  • GEV nearly doubled the output quality of base Llama models as a "no-training" option.

Expert Routing Optimization

  • GEV replaced general-purpose LLMs for routing queries to the most appropriate expert.
  • Implementation resulted in an 8x reduction in latency compared to previous methods.
  • Despite requiring significant infrastructure changes to integrate GEV, the latency reduction was deemed necessary to justify the system complexity.

Ranker (Suggestion Queue) Performance

  • The ranker selects the best follow-up suggestion from 10–15 sources generated by various NLLMs within a 1.5-second time limit.
  • GEV enabled valid suggestion generation within time bounds in 99.2% of cases, compared to 90% with general-purpose LLMs.
  • GEV reduced invalid outputs (e.g., wrong language, formatting errors) from ~10% to 0%, eliminating the need for guardrail-based filtering.
  • GEV provides probability scores for options rather than binary outputs, enabling dynamic threshold tuning.
  • Self-learning systems now automatically adjust thresholds based on individual customer usage patterns.

LLM-as-Judge and Citation Verification

  • GEV is used to verify if cited documents support the claims made in Glean's responses.
  • GEV demonstrated high consistency, with only 1 inconsistent result out of 28–30 use cases, compared to variability seen with LLM judges.
  • Consistency allows for the elimination of repeated experiment runs, increasing developer productivity by 5x–6x.
  • This productivity gain is viewed as an exponential improvement to product iteration speed across the ~500 engineer workforce.

Security and Infrastructure Efficiency

  • GEV replaced virtual classifiers hosted on T4 GPUs that were previously required for every single-tenant customer instance.
  • Recall in the initial security filtering phase improved from 31.5% to 90.2%.
  • Resource costs for security filtering were reduced by more than 50%, including savings on engineering labor required to maintain T4 GPU infrastructure across customers.

Decision Framework for Adoption

  • Glean adopts a simple heuristic for AI architecture: use GEV if the output can be listed in advance and labels are stable; use free-form LLM generation if dynamic text is required.
  • If labels are stable and volumes are high, fine-tuning is an option; however, GEV is preferred when labels change frequently.
  • Hybrid approaches combining GEV with free-form LLMs are considered for scenarios requiring both structured decisions and dynamic text generation.