惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog RSS Feed
云风的 BLOG
云风的 BLOG
爱范儿
爱范儿
WordPress大学
WordPress大学
博客园 - 三生石上(FineUI控件)
阮一峰的网络日志
阮一峰的网络日志
Martin Fowler
Martin Fowler
C
Check Point Blog
MongoDB | Blog
MongoDB | Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
人人都是产品经理
人人都是产品经理
博客园 - Franky
罗磊的独立博客
博客园 - 司徒正美
S
SegmentFault 最新的问题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
V2EX
Last Week in AI
Last Week in AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 聂微东
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
小众软件
小众软件
美团技术团队

InfoQ

GitHub Copilot Open-Source Project Brings Full iOS 27 Virtualization to Apple Silicon From Retrieval to Reasoning: Building Production-Ready Agentic AI Systems with Knowledge Graphs Lambda SnapStart Comes to Container Images, Ending a Packaging Tradeoff One Decade of Rustls: Evolution, Benchmarks, and Future Roadmap NVIDIA Personal AI Router Distributes AI Tasks across Local Compute Netflix Reworks Conductor for 420 Million Monthly Workflow Executions and 10X Larger Workflows tsgolint Reaches Stable v7, Bringing Go-Powered Type-Aware Linting to Oxlint Terraform AWS Provider Continues Rapid Expansion as AWS Infrastructure Becomes More Complex How To Run on Three Clouds at Once, and When Not To How LinkedIn Trains AI Job Search 8x Faster with Multi-Teacher Distillation Session Traces and Cost Controls Help Diagnose AI Agent Failures Advancing Embedded Go: Recoverable Panics, UEFI, Radio and Hardware Dev Kit Blume: Zero-Config Docs Framework That Turns a Markdown Folder into an AI-Ready Website Redefining GIS: Declarative Symbology and Collaborative Workflows in JupyterGIS Airbnb Cuts Authentication Code by 60% with Server Driven Architecture Kubernetes Promotes KYAML as a Safer, More Consistent Way to Work with Manifests Next-Gen Architecture Playbook: Insights and Patterns for the AI Era From S3 to GPU in One Copy: Rethinking Data Loading for ML Training Copilot Code Review Reaches Azure Repos, Billed Per Review with Reporting Two Days Behind Personality Over Skillset: How Adam Wachtel Builds Engineering Teams Tether: Apple Continuity Like Experience Between iOS and Linux Desktop Machines Twenty Years of jQuery: How a Little Library Rewired Web Development Rigorous Yet Sustainable Human Reviews in the AI Era pnpm 12 Rewrites Package Manager in Rust, Accelerating Installs While Preserving pnpm 11 Workflows Instrumentation at Scale: Having Your Performance Cake and Eating It Too Cohere’s Parse 5 Promises Efficient Multi-Modal Information Extraction From Complex Documents Swiggy Uses 350+ Features and Multi-Task MLP to Predict Customer Lifetime Value OpenAI Details GPT-Live’s Architecture for Continuous Stateful Voice Interaction Beyond Prompting: Context Engineering for Production-Grade AI
Shopify Introduces Gisting: Compressing LLM System Prompt...
Sergio De Simone · 2026-09-04 · via InfoQ

Shopify's engineering introduced Gisting, a novel technique for compressing long LLM prompts into a smaller set of learned "gist" tokens, improving throughput and reducing inference cost.

Spotify emphasizes that replacing lengthy text for concise gist tokens at inference time reduces end-to-end latency, drops infrastructure costs, and boosts token throughput without modifying the model's core weights.

The company says that gisting reduced the Sidekick GraphQL agent’s system prompt from about 6000 tokens to 1500 gist tokens without sacrificing prediction quality. This implies a 4:1 reduction in context size:

At 350 requests per minute (RPM), the median time to first token (TTFT) dropped from 438ms to 354ms, the median end-to-end request latency dropped from 6.8s to 4.2s, and throughput rose from 20.2 to 23.4 queries per second (QPS).

These improved metrics allowed Spotify to reduce the number of allocated GPUs.

Gisting is based on a technique pioneered in a 2022 paper, "Prompt Compression and Contrastive Conditioning for Controllability and Toxicity Reduction in Language Models", and consists of a two-step process to learn the embeddings of the new compressed gist token. In a first pass, the teacher pass, the model is run with the real prompt to derive the teacher logits of the response. In the student pass, the model is run with the gist tokens to derive the student logits. Finally, the gist are trained to minimize the KL divergence between the teacher logits and the student logits, that is until the student's predictions closely match the teacher's.

When training finishes, we write the gist embeddings straight into the model's embedding matrix, and register the new gist tokens as special tokens in the model’s tokenizer. The model loads and runs like any other at inference time: no custom attention mask, extra encoder, or special serving path.

The key advantage of gisting is that the model does not process a conventional summary of the original prompt, but rather a learned representation designed to make the LLM to behave as close as possible to how it would if it had seen the original prompt.

Gisting can reduce latency and increase throughput. In Shopify's case, Time to First Token (TTFT) dropped from 438ms to 354ms, and end-to-end latency fell from 6.8s to 4.2s. At the same time, queries per second (QPS) increased from 20.2 to 23.4, allowing engineering teams to scale down overall GPU allocation.

As a final note, Shopify also emphasizes that gisting is complementary to other optimization techniques, such as prefix caching. Prefix caching avoids recomputing the KV tensors for cached prompt sequences, but the model must still process those cached tensors during the decoding phase. Gisting further reduces this overhead by replacing a long prompt with a shorter sequence of learned gist tokens. The two optimizations therefore compound, and Shopify uses them together.

There is much more to gisting than can be covered here. Make sure to read the original article if you are interested in the full details, which covers topics such as the role of autosearch in tuning the Gisting process and other implementation details that significantly affect performance.

About the Author

Sergio De Simone