Chapter 8. RAG settings


When you upload a document for retrieval augmented generation (RAG), you can configure the following settings to optimize how the text is processed.

Maximum chunk length

The maximum word count for each text section ("chunk") created from your uploaded files.

  • Smaller chunks are recommended for precise data retrieval.
  • Larger chunks are recommended for tasks requiring broader context, such as summarization.

Chunk overlap

The number of words from the end of one text section (chunk) that are repeated at the start of the next one. This overlap helps maintain continuous context across chunks, improving model responses.

For example, the following sentence is chunked differently depending on the chunk overlap: "Chunk overlap can improve the quality of model responses."

Maximum chunk length = 4, Chunk overlap = 1

Chunk overlap can improve
improve the quality of
of model responses.

Maximum chunk length = 4, Chunk overlap = 0

Chunk overlap can improve
the quality of model
responses.

Delimiter

A character or string that specifies where a text chunk should end. This helps define text boundaries alongside maximum chunk length and overlap, ensuring sentences or paragraphs remain intact.

Examples of delimiters:

  • . (period): splits at sentence boundaries
  • \n (newline): splits at paragraph boundaries
  • ; (semicolon): splits at clause boundaries

    For example, the following sentence is split as follows depending on the delimiter: "This is the first sentence. This is the second sentence."

    Maximum chunk length = 4 , Chunk overlap = 0

    This is the first sentence. This is the second sentence.

    Maximum chunk length = 4 , Chunk overlap = 0, Delimiter = 0

    This is the first sentence.
    This is the second sentence.
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat Documentation

Legal Notice

Theme

© 2026 Red Hat
Back to top