How to write knowledge files
Accepted: PDF, DOCX, TXT, EPUB, HTML, MD, CSV, TSV, XLSX and images (PNG, JPG, WEBP).
How text is split
| Rule | Detail |
|---|---|
| Short files | 1,000 characters or fewer stay one piece |
| Longer files | Split at blank lines first, then sentence ends, then hard 1,000-character windows |
| Packing | Small paragraphs are merged into pieces of about 1,000 characters |
| Overlap | The last 150 characters of a piece repeat at the start of the next |
A blank line is a preferred break, not a guaranteed one. Two short paragraphs can share a piece.
Write for retrieval
- One topic per paragraph, with the subject named in the first sentence.
- Keep a question and its answer in the same paragraph.
- Repeat the product or branch name instead of writing "it" or "this one".
- Put a heading line above each section; headings travel with their paragraph.
- Avoid long unbroken text: past 1,000 characters it is cut at a sentence, or mid-sentence if there is none.
Sheets
Each row is written as Header: value · Header: value and rows are joined by single line breaks. Rows are not one piece each: with no blank lines a table is one long paragraph, split at sentence ends or hard windows.
| Sheet looks like | Becomes |
|---|---|
| A name column plus price columns | Catalog products. A price stays proposed until you approve it |
| A branch or outlet list | A branch proposal for you to review |
| Anything else | Text only |
Every sheet also keeps its table text as knowledge.
| Limit | Value |
|---|---|
| Rows per sheet | 20,000 |
| Columns | 200 |
| Characters per cell | 4,000 |
| Sheets per workbook | 20 |
| Text per file | 2,000,000 characters |
Sources under 48 bytes of text are marked too small and are not indexed.