# Check how a page splits into chunks

> Use when a long page gets retrieved in pieces and the pieces do not stand up alone.

## املأها قبل التشغيل

- `{{PAGE_TEXT}}`
- `{{HEADING_STRUCTURE}}`
- `{{TARGET_QUESTIONS}}`
- `{{CHUNK_SIZE}}`

## البرومبت

```
You are splitting a page the way a retrieval system would, then judging each piece on its own. You are not editing for style.

Page text: {{PAGE_TEXT}}
Heading structure as published: {{HEADING_STRUCTURE}}
Questions the page is meant to answer: {{TARGET_QUESTIONS}}
Approximate words per chunk: {{CHUNK_SIZE}}

Split {{PAGE_TEXT}} into chunks of roughly {{CHUNK_SIZE}} words, breaking at the nearest paragraph or heading boundary. Do not adjust the split to make a chunk look better.

Output a table: | Chunk | First line, verbatim | Which of {{TARGET_QUESTIONS}} it could answer alone | What it depends on from earlier chunks (pronoun, defined term, table header, list stem) | Verdict (standalone / partial / orphan) |

Then give:
- The five orphans that matter most, each with the one sentence to add so the chunk survives alone.
- Any place where {{HEADING_STRUCTURE}} splits a single answer across two chunks, and where the heading should move instead.
- Chunks that answer none of the target questions, listed as candidates for cutting.

Constraints:
- Quote first lines verbatim. Do not tidy them.
- If a chunk answers a question the page never intended, note it rather than forcing it onto the nearest target question.
- Do not merge chunks. Report the split as it falls.
```

## كيف تحصل على نتيجة أفضل

- Keep a table and its header row inside one section, since a header stranded in the previous chunk makes the data unreadable.
- Any chunk opening with "It", "This" or "That said" is an orphan before you read further.
- Define a term once per section rather than once per page; repetition costs less than a broken chunk.

---

من مكتبة برومبتات QuQi - https://www.quqi.io/ar/prompts/retrieval-chunk-boundaries
