AX Insight

HWP/HWPX Parsing for RAG Preprocessing: How to Choose a Parser That Preserves Administrative Document Table Structures

HANCOM

HWP/HWPX data extraction is the first step in converting public institution documents into data that AI can utilize. The Ministry of the Interior and Safety has restricted HWP attachments and mandated the use of HWPX in central and local On-Nara systems starting May 18, 2026. The Ministry of Economy and Finance has also decided to reflect AI utilization performance in public institution management evaluations, leading to a rapid increase in demand for converting administrative documents into data.

However, when HWP/HWPX documents are put into a document AI pipeline, tables are often damaged even if the main text is extracted to some extent. This article covers why HWP/HWPX table data extraction is difficult, parser selection criteria, parsing methods that preserve table structures, and parsing results verified with actual public institution documents from a RAG preprocessing perspective.

Why Errors Persist in AI Administrative Document Automation and Table Data Processing

When connecting HWP/HWPX administrative documents to a RAG pipeline, errors repeatedly occur in tables even if the text is extracted. If the row/column structure is extracted in a damaged state, the correspondence between numerical values and item names is broken, and irrelevant values are included in search results after being stored in the Vector DB. Since most public institution documents are table-centric—such as budget statements, status reports, and support project announcements—a single incorrectly extracted table structure can affect the data reliability of the entire document.

The cause of problems during administrative document RAG preprocessing usually occurs in the preceding stage of table data extraction, rather than in the LLM or search model. The reasons why errors occur so frequently in tables are as follows.

Why AI Fails to Properly Read HWP/HWPX Administrative Document Tables

AI finds it difficult to accurately recognize tables at once due to table processing methods, positioning errors caused by complex cell merging, and the unique way administrative documents have been authored over a long period.

LLM Recognition Limitations: Loss of Table Structure

Rather than understanding a table in its row/column structure, LLMs often convert and process it into a sequential text format. In this process, the cell positions or the relationship between headers and values can be weakened.

When humans look at a table, they connect and read the items on the left with the figures on the right, and the headers at the top with the values at the bottom, all at a glance.

For example, if ‘Young Entrepreneurs’ is under the support target item and ‘5 billion KRW’ is under the support amount item in the same row, a human naturally understands that the support amount for young entrepreneurs is 5 billion KRW.

However, if this table is converted into a single line of text like ‘Support Target Support Amount Young Entrepreneurs 5 billion,’ it becomes unclear which value connects to which item.

Original Table Structure After Table Recognition
Eligible Recipients Support Amount Young Entrepreneurs: 5 billion KRW
Young Entrepreneurs 5 billion KRW
Comparison image showing the problem of losing row/column relationships in tables during HWP/HWPX data extraction

In fact, research analyzing table understanding in large language models explains that linearizing a table results in the loss of unique structural and relational information, making it difficult to accurately identify specific cells or process complex statistics. It was also observed that model performance drops significantly if the structure changes even slightly, even if the table contains the same content.

Loss of location data due to complex cell merging and layouts

Merged cells and ‘table-within-a-table’ structures frequently seen in Korean administrative documents are difficult to process through simple text extraction alone. This is because it is not just the text inside the cells that is important; the connection between which items and which figures are in the same row/column must also be preserved.

For example, if support targets, support conditions, and support amounts are in a single table, and the cell positions and merging relationships are damaged, it becomes difficult to know which condition the amount corresponds to, even if the amount is extracted.

Document parsing research explains that table recognition does not simply end with finding the table area, but is a task that includes row/column division, cell content extraction, and interpretation of relationships between cells.

In other words, it is important to maintain which cell the text was in and which row/column context it belonged to during table data extraction.

If extraction occurs without connection information, it becomes difficult to determine which item a figure is connected to, even if the values inside the table remain. These poorly structured data points may then be used as-is in the next steps of the RAG pipeline. This increases the likelihood that the AI will fail to find the necessary evidence when answering table-based questions or will incorrectly connect items and figures.

Why Administrative Document Parsing is Complex: Decades of Version Fragmentation and Non-standard Objects

As administrative documents have been created in various versions over a long period, structures vary from document to document even within the same folder, making them difficult to process in bulk with a general-purpose parser.

Hancom Office Hangul used the HWP 3.0 format until 1997, and has used the HWP 5.0 format from Hangul 2002 to Hangul 2024. While encoding and formula expression methods are the same within the same format generation, HWP 3.0 and HWP 5.0 have different internal structures. Therefore, processing a folder containing a mix of both generations with a single general-purpose parser may result in errors or data loss due to format recognition failure.

Non-standard objects are also a significant variable. General-purpose parsers may treat elements unique to official documents—such as special characters (■, ○, ⑤), official seal images, or Hangul-specific formulas—as meaningless data. In such environments, a parser that goes beyond simply reading the file to understanding and correcting the document structure is required.

How to Choose a Data Parser for HWP/HWPX Table Extraction

There are four criteria for determining if a parser can preserve table structures: whether it reads the HWP/HWPX source directly, analyzes the document layout, recognizes the table structure, and exports the results in a form that can be used immediately for RAG.

Can it read HWP/HWPX formats directly?

Many global open-source parsers do not include formats widely used in the Korean document environment, such as HWP/HWPX, in their official support range, or they process them primarily through text extraction even if supported.

In particular, documents like Korean official documents that include tables, bullet points, indentation, multi-column layouts, and images are difficult to preserve in their original structure through simple text extraction alone.

To utilize HWP/HWPX files in RAG pipelines or AI search, the parser must be able to interpret the paragraph hierarchy, table cell structure, image references, and reading order within the file.

Does it recognize table position and context with DLA?

DLA (Document Layout Analysis) is a technology that distinguishes text, images, tables, and graphic elements within a document and identifies the position and relationship of each element. Without this step, table titles and table data become separated, making it difficult to understand the context.

Because DLA classifies objects within a document based on granular criteria, it can distinguish and recognize each area even when tables and images are adjacent, and it recognizes bulleted or indented list-type text as separate categories.

Does it preserve row/column relationships with TSR?

TSR (Table Structure Recognition) is a technology that identifies the cells that make up a table and structurally understands the table by analyzing the row/column positions and merging relationships of each cell. Without this function, the table structure is lost, leaving only text, making it difficult to accurately grasp the meaning of the data.

Table structure recognition identifies various types of tables, including not only general grid-type tables but also borderless tables, merged cells, and tables within tables (nested tables). Tables recognized this way can be converted into Markdown by cell, row, or column, or output in structured data formats such as JSON or HTML according to the purpose, allowing them to be used immediately in the RAG preprocessing and chunking stages.

Hancom Data Loader screen recognizing the structure of a table inserted in an HWP document for HWP/HWPX data extraction

Does it connect directly to RAG via JSON structured output?

Row/column relationships restored through table structure recognition can be utilized more stably in RAG pipelines when output in formats that can represent structure, such as JSON, Markdown, or HTML tables. For this, structural information such as table headers, row/column relationships, merged cells, and cell value positions must be preserved in the output results.


For example, if a table is organized in an ‘item-value’ format, the relationship ‘the value of item A is B’ can remain relatively clear even during the search stage.

Therefore, before implementation, it is recommended to directly check how tables, paragraph hierarchies, and image references are output using actual work document samples.

Hancom Data Loader: The Way to Parse HWP/HWPX Table Structures Without Loss

Hancom Data Loader is a document parsing solution that converts HWP, HWPX, PDF, and OOXML into structured data, and it can be reliably used for preprocessing table-centric administrative documents.

✅ Created by Hancom, the developer of HWP/HWPX, this parser reads the file structure directly.

✅ Since it parses the original HWP/HWPX files directly without converting them to PDF, structural loss that occurs during the conversion stage can be avoided.

✅ It recognizes table positions and title/caption contexts with DLA.

✅ It structures the row/column relationships of merged cells and multi-level headers with TSR.

✅ Extraction results can be exported as JSON to connect directly to RAG pipelines.

*Source: Hancom Data Loader

💡 If you want to see the results of how tables in HWP/HWPX documents are actually structured first, you can check them out for yourself in the live demo.

👉 Go to Hancom Data Loader Live Demo

Examining the HWP/HWPX Table Parsing Process with Public Institution Support Project Documents

Table Structure Characteristics of Public Institution Announcements

Support project announcements are documents where support conditions, support content, and support targets are complexly composed of merged cells and nested tables. When extracted with a general-purpose parser, row/column relationships are the first to be damaged. Structures where one cell spans multiple rows or small tables are contained within a table appear frequently.

These documents are representative types with high parsing difficulty due to many cell merges and multi-column layouts. If preprocessed with a parser that cannot read HWP/HWPX directly, support amounts may be connected to irrelevant items, or the correspondence between conditions and targets may be broken, reducing their value as data.

Hancom Data Loader Parsing Results: Table Data Preserved in JSON Structure

When the same announcement is parsed directly based on the original file, objects such as tables, cells, and text are distinguished by type and output in a JSON hierarchical structure along with the position information of each object.

Because the structure includes cell information within table objects and text within cells, row/column relationships can be maintained even in complex tables containing merged cells.
Through this, you can verify which value belongs to which item within the data structure.

Example screen of table data preserved in JSON structure as a result of HWP/HWPX data extraction

JSON organized this way can be used immediately as RAG chunking units. Since the value of a single table cell is searched while maintaining what item and what condition it is a value for, the AI can find accurate evidence and answer even table-based questions. However, since formats capable of JSON structured output differ from those processed primarily through text extraction, it is advisable to check the format of the target document first.

HWP/HWPX Data Extraction FAQ

Q1. How should I preprocess large volumes of HWP administrative documents to index them in a Vector DB?

You can parse the original directly to preserve the table and hierarchical structure, structure it into JSON, and then chunk and embed it by those units. If indexed with damaged tables, it will be difficult to recover search accuracy later.

Q2. Converting HWP to PDF results in the loss of table structure. Does this affect RAG performance?

In the process of converting HWP/HWPX formats to PDF, if tables are treated like images or the hierarchical structure is lost, the impact extends to chunking and searching. Therefore, it is more stable to parse the original directly to preserve tables, footnotes, and hierarchies.

Q3. What is the method for embedding preprocessing while preserving the table structure?

You can restore row/column relationships with TSR, export them as structured data like JSON, and then perform embedding. Row/column relationships must remain in the data for the AI to search for table values in the correct context.

🖥️Hancom Data Loader

Hancom Data Loader is a document parsing solution that parses HWP/HWPX originals directly to extract structured data while preserving row/column relationships, including merged cells and nested tables. The extracted data can be integrated with our RAG solution, Hancompedia, to build a single Hancom stack from document collection to search and answering. You can start your document preprocessing without table damage with Hancom Data Loader.

👉 Go to Hancom Data Loader Live Demo

👉 Inquire about Hancom Data Loader implementation

References

  1. arXiv, “Rethinking Tabular Data Understanding with Large Language Models,” Liu, T. et al., 2023
  2. arXiv, “Document Parsing Unveiled: Techniques, Challenges, and Prospects for Structured Information Extraction,” Zhang, Q. et al., 2024
  3. Microsoft Learn, “Choose the right Azure AI tool for document processing,” 2026
  4. Unstructured, “Supported file types”
  5. LlamaIndex, “LlamaParse Supported Document Types”
  6. Hancom Tech, “Hangul Documents for the AX Era: Analysis of Open Source Ecosystem Status and Activation Strategy”