Architecture of an on-premise RAG ingestion pipeline in Java: Word, PDF, email and ZIP files become heading-scoped Markdown chunks with source and parent lineage in JSON Lines....chunks, then child chunks Extract extractMarkdown getFormattedText...getText Falls back, then none Text plus format label Chunk chunkByHeadings...