Back to Mastra

Adjust chunk size

examples/basics/rag/adjust-chunk-size/README.md

2025-12-18458 B
Original Source

Adjust chunk size

A simple example showing how to adjust chunk size using Mastra.

Prerequisites

  • Node.js 22.13.0 or later
  • pnpm (recommended) or npm

Getting Started

  1. Clone the repository and navigate to the project directory:

    bash
    git clone https://github.com/mastra-ai/mastra
    cd examples/basics/rag/chunk-text
    
  2. Install dependencies:

    pnpm install
    
  3. Run the example:

    bash
    pnpm start