Skip to content

How to write knowledge files

Accepted: PDF, DOCX, TXT, EPUB, HTML, MD, CSV, TSV, XLSX and images (PNG, JPG, WEBP).

How text is split

RuleDetail
Short files1,000 characters or fewer stay one piece
Longer filesSplit at blank lines first, then sentence ends, then hard 1,000-character windows
PackingSmall paragraphs are merged into pieces of about 1,000 characters
OverlapThe 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 likeBecomes
A name column plus price columnsCatalog products. A price stays proposed until you approve it
A branch or outlet listA branch proposal for you to review
Anything elseText only

Every sheet also keeps its table text as knowledge.

LimitValue
Rows per sheet20,000
Columns200
Characters per cell4,000
Sheets per workbook20
Text per file2,000,000 characters

Sources under 48 bytes of text are marked too small and are not indexed.