Skip to content

RagService 문서 parser 지원 형식 ​

RagService parser는 원본 파일을 외부 SaaS로 전송하지 않는다. 모든 parser와 OCR·vision adapter는 사내 network 또는 명시적으로 구성된 격리 converter에서만 실행한다. 구조 parser의 출력은 StructuredDocument → Markdown → Semantic Chunking의 단일 입력 계약으로 연결된다.

범주확장자구조 처리보안·운영 경계
PDF.pdfpdfplumber가 table bounding box를 찾고, 표 위·아래 text block과 Markdown 표를 page y-order로 병합한다.텍스트 layer가 없으면 경고를 남기고, image/OCR pipeline으로 별도 처리한다.
한글.hwpxZIP/XML native 문단·표 구조를 읽는다.외부 변환 API를 사용하지 않는다.
한글 legacy.hwp격리 pyhwp hwp5html adapter의 HTML/표를 구조화한다.pyhwp AGPL-3.0 라이선스를 운영자가 검토한 별도 converter에만 설치한다.
MS Office OOXML.docx, .xlsx, .pptxheading, paragraph, worksheet/slide, 표를 Markdown/structure로 변환한다.macro-enabled .docm/.xlsm/.pptm은 기본 거부한다.
MS Office legacy.doc, .xls, .pptopt-in 시 격리 LibreOffice safe-mode adapter가 OOXML로 변환한 뒤 기존 구조 parser를 사용한다.기본 거부. 악성코드 검사 후 DOCUMENT_PIPELINE_ALLOW_LEGACY_OFFICE=true 및 local converter가 있어야 한다.
OpenDocument.odt, .ods, .odpODF text/table adapter로 Markdown을 생성한다.macro/script를 실행하지 않는다.
구조 text.csv, .tsv, .json, .jsonl, .xml, .yaml, .yml, .ini, .cfg, .eml표, JSON/YAML, XML text/attribute, config section, email header/plain text body를 구조 Markdown으로 만든다.JSON/YAML/XML을 실행하지 않으며 mail attachment는 FileStore의 별도 ingestion 흐름으로 분리한다.
일반 text/web.txt, .log, .md, .markdown, .rst, .tex, .html, .htm, .rtflocal text/HTML table/RTF text adapter를 사용한다.HTML의 script는 실행하지 않고 visible text/table만 읽는다.
이미지.png, .jpg, .jpeg, .tif, .tiff, .bmp, .webplocal Tesseract OCR, 선택적 internal VLM description을 사용한다.OCR/VLM endpoint는 internal network만 허용한다.

Legacy Office 운영 절차 ​

.doc, .xls, .ppt은 현대 OOXML과 달리 embedded macro·object 위험을 더 많이 포함할 수 있다. RagService는 기본적으로 이를 거부한다.

운영자는 FileStore 악성코드 검사 완료 후에만 legacy Office 처리 작업을 격리된 converter environment에 전달해야 한다. converter에는 libreoffice --headless --safe-mode를 제공하고 LIBREOFFICE_BIN으로 binary 위치를 지정한다. RagService parser는 converter가 만든 임시 OOXML 파일만 이어서 해석하며, 원본 macro/object를 실행하지 않는다.

테스트 범위 ​

tests/test_general_file_parser.py는 TSV Markdown table, JSON/XML/INI/EML local structure output, legacy Office의 default rejection을 검증한다. 실제 LibreOffice compatibility는 운영자가 사용하는 converter image와 실제 샘플 corpus로 추가 검증해야 한다.