# Semantically Compress Text to Save On LLM Costs

DevFeed: [Semantically Compress Text to Save On LLM Costs](<https://devfeed.tech/articles/semantically-compress-text-to-save-on-llm-costs-38726.md>)

Original publisher: [Read original article](<https://blog.developer.bazaarvoice.com/2024/10/28/semantically-compress-text-to-save-on-llm-costs/>)

Author: Lou Kratz

Published: 2024-10-28T13:34:46Z

Content type: article

Language: en

Sources: [Bazaarvoice](<https://devfeed.tech/sources/bazaarvoice.md>)

Topics: [Large Language Model](<https://devfeed.tech/topics/llm.md>), [long-context](<https://devfeed.tech/topics/long-context.md>), [Compression](<https://devfeed.tech/topics/compression.md>), [clustering](<https://devfeed.tech/topics/clustering.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [bazaarvoice](<https://devfeed.tech/tags/bazaarvoice.md>), [clustering](<https://devfeed.tech/tags/clustering.md>), [compression](<https://devfeed.tech/tags/compression.md>), [context-window](<https://devfeed.tech/tags/context-window.md>), [llm](<https://devfeed.tech/tags/llm.md>), [uncategorized](<https://devfeed.tech/tags/uncategorized.md>)

## AI overview

Bazaarvoice describes a multi-pass hierarchical clustering approach for semantically compressing large collections of user reviews so its AI Review Summaries feature can operate within LLM context-window limits and reduce token-related costs. The article says the technique allows adjustment of detail loss and helped make the feature financially feasible.

## Source excerpt

Introduction Large language models are fantastic tools for unstructured text, but what if your text doesn't fit in the context window? Bazaarvoice faced exactly this challenge when building our AI Review Summaries feature: millions of user reviews simply won't fit into the context window of even newer LLMs and, even if they did, it would [...]