RecursiveChunking searches backward from each size limit for a newline, then a period, before using the limit itself.
1
Create a Python file
recursive_chunking.py
2
Set up your virtual environment
3
Install dependencies
4
Export your OpenAI API key
5
Run PgVector
6
Run the script
split_on_pages=False so PDFReader combines the pages before applying RecursiveChunking. Keep the default value of True to chunk each page independently.