# Chunking Strategies for LLM applications

**URL:** <https://community.pinecone.io/t/chunking-strategies-for-llm-applications/1067>\
**Category:** General\
**Created:** [April 7, 2023, 10:55pm UTC](https://community.pinecone.io/t/chunking-strategies-for-llm-applications/1067 "2023-04-07T22:55:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![discobot](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/discobot/32/2_2.png) [@discobot](https://community.pinecone.io/u/discobot)\
**Post date:** [April 7, 2023, 10:55pm UTC](https://community.pinecone.io/t/chunking-strategies-for-llm-applications/1067/1 "2023-04-07T22:55:33Z")

</div>

In the context of building LLM-related applications, **chunking** is the process of breaking down large pieces of text into smaller segments. It’s an essential technique that helps optimize the relevance of the content we get back from a vector database once we use the LLM to embed content. In this blog post, we’ll explore if and how it helps improve efficiency and accuracy in LLM-related applications.

As we know, any content that we index in Pinecone needs to be [embedded](https://www.pinecone.io/learn/vector-embeddings-for-developers/) first. The main reason for chunking is to ensure we’re embedding a piece of content with as little noise as possible that is still semantically relevant.

* * *
This is a companion discussion topic for the original entry at [https://www.pinecone.io/learn/chunking-strategies/](https://www.pinecone.io/learn/chunking-strategies/)

---

<div class="post-metadata">

**Author:** ![nopsled](https://avatars.discourse-cdn.com/v4/letter/n/bbce88/32.png) [@nopsled](https://community.pinecone.io/u/nopsled)\
**Post date:** [April 11, 2023, 6:37pm UTC](https://community.pinecone.io/t/chunking-strategies-for-llm-applications/1067/2 "2023-04-11T18:37:49Z")

</div>

I’ve built a “talk with your books” chatbot using this chunking approach and Pinecone. A fork of [GitHub - mayooear/gpt4-pdf-chatbot-langchain: GPT4 & LangChain Chatbot for large PDF docs](https://github.com/mayooear/gpt4-pdf-chatbot-langchain)

A big problem here is that the bot cannot summarize a book or any large document because it only sees 1-2 chunks at a time. It can answer questions as long as the answer is fully contained inside a chunk, but not more than that. Are there any approaches to chunking that will allow a model to be able to “digest” a large document?

---

<div class="post-metadata">

**Author:** ![basujindal](https://avatars.discourse-cdn.com/v4/letter/b/d2c977/32.png) [@basujindal](https://community.pinecone.io/u/basujindal)\
**Post date:** [April 12, 2023, 6:53pm UTC](https://community.pinecone.io/t/chunking-strategies-for-llm-applications/1067/3 "2023-04-12T18:53:33Z")

</div>

Hi, one way is to make smaller chunks and concatenate top-k before feeding them to the LLM. Even this approach is limited by the context length of the LLM. If the document is very large, I suppose currently the only method is to fine-tune the LLM on it.

---

<div class="post-metadata">

**Author:** ![nopsled](https://avatars.discourse-cdn.com/v4/letter/n/bbce88/32.png) [@nopsled](https://community.pinecone.io/u/nopsled)\
**Post date:** [April 12, 2023, 8:38pm UTC](https://community.pinecone.io/t/chunking-strategies-for-llm-applications/1067/4 "2023-04-12T20:38:05Z")

</div>

Thanks, both of those approaches sound good!

---

<div class="post-metadata">

**Author:** ![moneygreen](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@moneygreen](https://community.pinecone.io/u/moneygreen)\
**Post date:** [April 20, 2023, 1:29pm UTC](https://community.pinecone.io/t/chunking-strategies-for-llm-applications/1067/5 "2023-04-20T13:29:13Z")

</div>

How do you think your model would perform with summarization instead of chunking?

---

<div class="post-metadata">

**Author:** ![Sahin](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@Sahin](https://community.pinecone.io/u/Sahin)\
**Post date:** [June 5, 2023, 11:37am UTC](https://community.pinecone.io/t/chunking-strategies-for-llm-applications/1067/6 "2023-06-05T11:37:39Z")

</div>

Very informative, thank you!

That would have been great if you could give examples of performance tuning based on sets of text characteristics and different chunk methods, sizes and overlaps.

---

<div class="post-metadata">

**Author:** ![densonsmith2](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/densonsmith2/32/761_2.png) [@densonsmith2](https://community.pinecone.io/u/densonsmith2)\
**Post date:** [June 14, 2023, 10:50pm UTC](https://community.pinecone.io/t/chunking-strategies-for-llm-applications/1067/7 "2023-06-14T22:50:08Z")

</div>

Can anyone point me at any scientific peer reviewed journal articles, whitepapers etc. on this topic? I’m writing a paper on the subject myself but so far I have not found any closely related previous work.
