liveBook · Manning

Delimiter

As explained in Grokking AI Applications

A delimiter string or pattern used to divide source text into pieces before they are merged or trimmed to fit chunking constraints.

A delimiter is a string or pattern that marks boundaries in text. In chunking, it identifies meaningful breaks before pieces are merged or trimmed to fit a size limit. In prompts, it clearly separates an instruction from the object being processed. section 6.3 section 3.1

Use delimiters to preserve structure and reduce ambiguity:

  • Choose a separator that reflects the content’s natural boundaries, such as the whitespace-and-newline pattern before a recipe title. section 6.3
  • Let the splitter divide text at each separator, then merge or trim the resulting pieces to meet the chunk-size constraint. section 6.3
  • Enclose a prompt object in quotation marks or identify it with an explicit variable such as TEXT. section 3.1
  • Reserve delimiter characters for separation; choose an alternative when the enclosed object already contains those characters. section 3.1

Keeping a recipe together

Character-only chunking can split a recipe across two chunks, causing retrieval to return only part of it. A separator consisting of a space, a newline, and three spaces usually creates one chunk per recipe. OCR irregularities may still cause two recipes to share a chunk, so the pattern may need adjustment. section 6.3

Figure 6.7 With the right Separator string, the text is split into meaningful chunks: one per recipe.

Illustrates how a configured Separator string produces more meaningful, recipe-sized chunks. section 6.3

How Grokking AI Applications covers it

How deep it goes
Explains delimiter selection and processing behavior, then notes OCR irregularities that can weaken an otherwise effective pattern.
Examples
Uses recipe boundaries, a whitespace-and-newline separator, quoted prompt objects, explicit variables, and code containing quotation marks.
What it assumes
Assumes familiarity with text objects and task instructions while demonstrating both concepts through concrete recipes and prompt inputs.
What you can do after
Operate/configure it in a Split Text component or prompt by selecting boundaries that keep content identifiable and intact.
How it connects
Links text chunking, retrieval-augmented generation, prompt engineering, variables, and quotation marks.

Also explained in

Compare how 11 books explain delimiter →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking AI Applications. The section links point to the parts of the book it draws on.