After partitioning, you can have Unstructured generate representations of each detected table in HTML markup format.
This table-to-HTML output is generated by using agentic AI or a vision language model (VLM).
The agentic AI option typically provides more accurate table-to-HTML output than the VLM option.
Here is an example of the HTML markup output of a detected table using GPT-4o. Note specifically the
text_as_html field that is added.
Line breaks have been inserted here for readability. The output will not contain these line breaks.
The
image_base64 field is generated only for documents or PDF pages that are partitioned by using the High Res strategy. This field is not generated for
documents or PDF pages that are partitioned by using the Fast or VLM strategy.- If a
Tableelement must be chunked, theTableelement is replaced by a set of relatedTableChunkelements. - Each of these
TableChunkelements will contain HTML table output for only its own element. - None of these
TableChunkelements will contain animage_base64field.
Generate table-to-HTML output
To generate table-to-HTML output, add a Table to HTML node to your workflow by clicking + in the workflow editor, and then click Enrich > Table to HTML. To use agentic AI to generate the table-to-HTML output, for Mode, click Agentic. To use a VLM to generate the table-to-HTML output instead, for Mode, click Standard. Then click one of the available Provider and Model options.You can change a workflow’s table description settings only through Custom workflow settings.For workflows that use chunking, the Chunker node should be placed after all enrichment nodes. Placing the
Chunker node before a table-to-HTML output enrichment node could cause incomplete or no table-to-HTML output to be generated.

