기업 문서를 AI 사용에 적합하게 — 신뢰성 있게, 온프레미스 환경에서, 의미론적으로 준비하세요.
조직에서 PDF, DOCX, XLSX 및 ePub 형식으로 문서를 보관하는 경우가 흔합니다. LLM(대형 언어 모델)은 HTML이나 일반 텍스트에서 잘 동작하지만, 이러한 고유 문서 형식은 LLM + RAG 파이프라인에서 효과적으로 사용하기 위해 변환이 필요합니다. 변환 후에는 문서와 대화하거나 여러 문서에 대해 질문할 수 있습니다.
LLM(대형 언어 모델) — 방대한 텍스트 코퍼스를 기반으로 텍스트를 생성하고 질문에 답변하는 사전 학습 AI 모델.
RAG(검색 강화 생성) — 외부 지식베이스(예: 기업 문서)를 결합해 모델이 도메인 콘텐츠를 검색하고 추론하도록 하는 접근 방식.
아래 순서도는 질문에 대한 답을 생성하는 일반적인 단계를 보여줍니다.
시스템(LLM + RAG)에서 얻는 답변의 품질은 시스템 자체와 소스 문서가 검색 파이프라인에 투입될 때 구조와 의미를 얼마나 잘 보존하느냐에 달려 있습니다.
문제점
문서 포맷은 시각적인 요소뿐 아니라 의미론적 정보를 담고 있습니다. 제목, 목록, 표, 굵게/기울임 강조, 캡션, 인라인 이미지 등은 모두 LLM이 문맥을 이해하는 데 필요한 의미를 전달합니다. 페이지를 단순히 평면 이미지로 처리하는 OCR 등은 이러한 의미를 손실시켜 RAG 검색 및 하위 LLM 응답이 부정확하거나 노이즈가 섞이게 만듭니다.
OCR은 스캔 문서에 유용하지만, 목록이 페이지를 넘어가거나 표 경계가 잘못 인식되는 등 구조를 잃어버리는 경우가 많습니다. 또한 대용량 아카이브를 처리할 때 비용과 인프라 부담이 늘어납니다.
해결책
문서를 구조 인식하고 해당 구조를 LLM 친화적인 의미론적 포맷인 Markdown 으로 내보내는 방식이 대안이 됩니다. Markdown은 가볍고 널리 지원되며, 제목, 목록, 표, 코드 블록, 강조, 캡션, 이미지 참조 등을 그대로 보존해 검색 품질을 크게 높입니다.
GroupDocs.Markdown for .NET 은 PDF, DOCX, XLSX, ePub 등 다양한 포맷을 깨끗한 의미론적 Markdown 으로 변환합니다. 온프레미스 .NET 라이브러리이므로 모든 처리가 내부 환경에서 이루어지며, 외부 서비스 이용 없이 데이터 유출 위험이 없고 원격 GPU 의존성도 없습니다.
시작하는 방법
GroupDocs.Markdown for .NET 은 NuGet 패키지와 MSI / ZIP 형태로 제공됩니다.
.NET CLI 로 NuGet 패키지를 설치합니다:
dotnet add package GroupDocs.Markdown
또는 공식 다운로드 페이지에서 설치 파일과 어셈블리를 받으세요: https://releases.groupdocs.com/markdown/net/
예시 사용법 (Program.cs에 추가):
// Import the namespace
using GroupDocs.Markdown;
// Set the license (optional for evaluation)
License.Set("GroupDocs.Markdown.lic");
// Instantiate the converter for a source document
var converter = new MarkdownConverter("rich-text-formatting.docx");
// Convert and save output to file
converter.Convert("rich-text-formatting.md");
변환된 rich-text-formatting.md 파일은 애플리케이션과 같은 폴더에 저장됩니다.
아래 스크린샷은 입력 DOCX 파일과 출력 Markdown 파일을 보여줍니다.
평가 모드로 실행하면 제한된 페이지 수(예: 처음 3페이지)만 처리됩니다. 전체 기능을 사용하려면 임시 라이선스를 요청하세요.
임시 라이선스 요청은 Purchase Wizard 페이지에서 연락처 정보를 입력하고 Get a temporary license 를 클릭하면 됩니다. 라이선스는 이메일로 전달됩니다.
임시 라이선스에 대한 자세한 내용: https://purchase.groupdocs.com/temporary-license/.
지원 파일 형식
GroupDocs.Markdown for .NET 은 광범위한 기업 및 전자책 포맷을 지원합니다. 전체 확장자 목록은 다음과 같습니다.
- PDF
pdf
- 스프레드시트
.xls,.xlsx,.xlsb,.xlsm,.xlt,.xltx,.xltm,.xlam,.csv,.tsv,.ods,.ots,.fods,.numbers,.sxc
- 워드 / 리치 텍스트
.doc,.docx,.dot,.dotm,.dotx,.docm,.rtf,.odt,.ott
- 전자책
.azw3,.mobi,.epub
- 텍스트 / 마크업 / 도움말
.chm,.xml,.txt
내부 동작 (고수준)
문서가 처리될 때 두 단계가 진행됩니다.
-
문서 모델 추출
문서는 메모리 내 객체 모델로 파싱되어 단락, 제목, 리스트, 표, 이미지, 각주, 주석 등 구조적 요소를 표현합니다. 파서는 가능한 한 의미(예: 리스트 중첩, 표 셀, 이미지 캡션)를 보존하려고 시도합니다. -
Markdown 생성
객체 모델을 순회하며 설정 가능한 변환 옵션(이미지 처리, 표 포맷, 제목 레벨, 특수 주석 등)에 따라 Markdown 으로 변환합니다. 결과물은 RAG 파이프라인이 색인하기에 적합한 읽기 쉬운 의미론적 Markdown 파일이 됩니다.
내보내기 예시
위 코드 예시를 통해 DOCX → Markdown 변환 과정을 보여드렸습니다. 이제 원본과 출력 파일을 살펴보겠습니다.
Source DOCX
원본 파일 rich-text-formatting.docx 은 다양한 콘텐츠 블록과 풍부한 서식을 포함하고 있어 주요 의미 요소를 강조합니다.
Output Markdown
아래는 변환된 rich-text-formatting.md 의 내용 일부입니다.
This document contains a variety of formatted elements that are used to test document rendering quality during file conversion
# <a name="_toc76372684"></a>**Font Formatting**
Source Sans Pro Light, 14 pt.
Simple text in Times New Roman 12 followed by an empty paragraph<sub>subscript</sub> and<sup>superscript</sup>.
Various characters: ‘ “ & < > £ ¥ § ¨ © ª « ® » ¼
Paragraph with multiple segments of text formatted in different fonts, sizes and colors. Very different sizes and colors including **bold**, *italic*, underline and 1 2 3 4 5 ~~strikethrough~~. Make sure that the lines wrapped in the same way in Word and in Pdf.
This text has shading and highlighting and borders, and it is supported.
# <a name="_toc76372685"></a>**Paragraph Formatting**
Paragraph shading should not form empty gaps even with spacing 12 after.
Centered paragraph with a line break had a problem.\
Centered paragraph with a line break had a problem.
Right aligned paragraphs must be right aligned properly.
Right aligned paragraph with line break works well.\
Right aligned paragraph with line break works well.
This paragraph has a border.
Right aligned condensed text had a problem.
Right aligned expanded text had a problem.
Spacing after and before do not add up, just the greater is used. This paragraph has 12 after. Also, when indents are different, the shading does not join.
This paragraph has 12 before, but in total there is only 12 above. Also note that shading belongs to the paragraph at the top and shading of this paragraph does not go down unless next paragraph has shading too. There are 24 points below.
There are 24 points above, but the gap between this and previous paragraph is only 24.
This paragraph is a test for double line spacing. This paragraph is a test for double line spacing. It also have 0.5” for the first line.
This is a test for 1.5 line spacing. This is a test for 1.5 line spacing. Also has -0.5” indent for the first line.
This paragraph has a page break
and centered. It actually creates two paragraphs.
This is a test for Exactly 20 points of spacing. This is a test for Exactly 20 points of spacing. TTTTTT (20, 22, 24, 26, 28, 30).
There is a continuous section break after this line.
This line is in the new section. Next here is an empty section.
This line is in the fourth section.
# <a name="_toc76372686"></a>**Paragraph Justify**
This is a justified paragraph with a single segment. 111111111111111111111111111111111111111111.
Also a justified **paragraph** reset to left because of multiple segments. 111111111111111111111111111111111111111111.
# **Non-English Characters**
Wingdings: (x, Symbol: WÄ
Russian: Теперь немного по русски.
# <a name="_toc76372687"></a>**Tables**
|Cell 1.1 Left|Cell 1.2 Right|||
| :- | -: | :- | :- |
|Cell 2.1 Centered vertically|Cell 2.2 with background|Cell 2.3 with line break<br>and coloured border.||
|Cell 3.1 Bottom vertically|<p>Cell 3.2</p><p>Centered</p><p>Horizontally</p>|Cell 3.3 No border||
|Left red, blue top, green right and yellow bottom.|
| :- |
|Table with left indent and merged cells.||||
| :- | :- | :- | :- |
|||||
|||||
**Cell padding etc.**
|<p>Cell padding.</p><p>Top: 0.1, bottom 0.2</p><p>Left: 0.5, Right 0.4</p>|Zero padding on all sides, right aligned.|
| :- | -: |
|Outer 1.1|Outer 1.2. There is a nested table here||
| :- | :-: | -: |
|**Nested 1.1**|**Nested 1.2**|
| :- | :- |
|||Outer 1.3|
| :- | :-: | -: |
#
# <a name="_toc76372688"></a>**Lists**
**Numbered list:**
1. Item 1
1. Item 2
1. Item 2.1
1. Item 2.2
1. Item 3
**Bulleted list:**
- Item 1
- Item 2
- Item 2.1
- Item 2.2
- Item 3
#
# <a name="_toc76372689"></a>**Images**
This section starts from a new page.
**Ellipse text**

**표 안의 이미지**. 왼쪽 및 오른쪽 정렬.
| 이 텍스트는 이미지 뒤에 있습니다.
표 안의 이미지. 왼쪽 및 오른쪽 정렬.
|||
인라인 텍스트 박스  은 여기 그리고 인라인 타원  은 여기.
새 페이지에서 시작하는 **새 섹션** 은 여기.
세로 방향과 여백이 적용됩니다.
# <a name="_toc76372690"></a>**필드**
머지 필드 «FirstName»
페이지 번호 5
하이퍼링크 [Aspose.com](http://www.aspose.com)
목차
[Font Formatting 1](#_toc76372684)
[Paragraph Formatting 1](#_toc76372685)
[Non-English Characters 2](#_toc76372686)
[Tables 2](#_toc76372687)
[Lists 2](#_toc76372688)
[Images 4](#_toc76372689)
[Fields 5](#_toc76372690)
# **폼 필드**
Edit <a name="text1"></a>test text
Checkbox <a name="check1"></a>
Combobox <a name="dropdown1"></a>
# **각주 및 미주**
이 줄에는 **각주**가 있습니다.[^1]
이 줄에는 **미주**가 있습니다.[^2]
[^1]: Footnote 1.
[^2]: Endnote 1.
---
## 요약
GroupDocs.Markdown for .NET 은 다양한 문서 포맷을 의미론적 Markdown 으로 변환해 **LLM + RAG** 시스템에 바로 사용할 수 있게 합니다. 문서 구조와 의미를 보존하면서 온프레미스에서 실행되며, 흔히 사용하는 기업 포맷을 지원해 AI 활용을 위해 대량의 문서 컬렉션을 준비해야 하는 조직에 실용적인 선택이 됩니다.
---
## 자세히 알아보기
- 제품 페이지: https://products.groupdocs.com/markdown/net/
- 문서: https://docs.groupdocs.com/markdown/net/
- 라이선스 정보: https://about.groupdocs.com/legal/
- 다운로드: https://releases.groupdocs.com/markdown/net/
---
## 지원 및 피드백
질문이나 기술 지원이 필요하면 [Free Support Forum](https://forum.groupdocs.com/) 를 이용해 주세요 — 기꺼이 도와드리겠습니다.