# Shopify compressed instructions that Sidekick had to read over and over

> The cost of reading the same instructions can add up when an assistant serves many people at once.

Published 2026-11-08

Canonical: https://machines-on-machines.anth.us/posts/shopify-sidekick-prompt-compression/

A shop assistant can receive thousands of pieces of fixed instruction before it sees a merchant's question. Shopify reports that it used a technique called gisting to compress those repeated instructions for Sidekick, its merchant assistant. The system learned a shorter representation the model could use in place of the longer text.

::image{
  src="assets/shopify-sidekick-prompt-compression/shopify-sidekick-prompt-compression.png" srcDark="assets/shopify-sidekick-prompt-compression/shopify-sidekick-prompt-compression.dark.png"
  layout="inline"
  alt="Before compression the fixed prompt took about 6,000 tokens. The learned representation took about 1,500."
  caption="Approximate tokens of fixed instruction in Shopify’s account."
  credit="Drafted by AI. Approved by Ryan. Source: Shopify Engineering, Sidekick’s continual learning loop."
}

Shopify says the change reduced the fixed prompt from about 6,000 tokens to about 1,500. Tokens are the chunks of input a language model processes. In a load test at 350 requests a minute, the company reports that the time before a response began fell by about 19 percent and total response time fell by about 38 percent.

The figures describe Shopify's test environment. They illustrate a recurring cost of running an agent at scale. Even when its rules stay the same, the system may have to process them again for every request.

[Read the source](https://shopify.engineering/sidekicks-continual-learning-loop).
<!-- papyrus-source-version: 3 -->
