from haystack import Document from haystack.components.preprocessors import DocumentPreprocessor raw_document = Document( id="policy-draft", content=( "CONFIDENTIAL Solar policy drafts need precise source text.\n\n" "Retrieval chunks should stay focused on one section.\n\n" "Reviewers need overlap when a boundary carries context.\n\n" "Source metadata must remain attached for later indexing." ), meta={"source": "policy-draft.txt"}, )