Inconsistent table parsing behavior #54

Closed
opened 2026-02-16 00:16:44 -05:00 by yindo · 1 comment
Owner

Originally created by @guillaume-millot on GitHub (Mar 19, 2024).

I've parsed the following PDF consisting of 2 tables:
ENI_2018_p12-13.pdf

The two tables have the same schema and include financial metrics per country & per continent ("EUROPE", etc.) and for the whole company "Eni Group" (bottom of 2nd table).

Here's the parsing results exported to PDF:
ENI_2018_p12-13_parsed.pdf

# Code snippet of parsing task
json_objs = LlamaParse(verbose=True).get_json_result(document_path)

dfs = []
for page in json_objs[0]["pages"]:
  for item in page["items"]:
    if item['type'] == 'table':
      df = pd.DataFrame(item["rows"][1:], columns=item["rows"][0])
      dfs.append(df)

A few observations:

  1. First column "Full year 2018" was renamed to "Country"
  2. Continent rows in table 1 ("EUROPE", "AFRICA") were removed, BUT not in table 2 ("ASIA AND OCEANIA", "AMERICAS" still there)
  3. "Eni Group" row in table 2 is still there
  4. Column "Total revenues" was renamed to "Total revenues (€ thousand)", but only on this column, and only in Table 1

My questions:

  1. Do you have a kind of semantic/understanding layer in your parsing?
  2. Could you explain the delta in parsing between table 1 and table 2

As a user, I'm not sure what to expect. For example, on one side, I love it that you renamed "Full year 2018" to "Country" as this new name seems closer to what the column really is about. However, in that case, I believe I would expect a consistent behavior in what is parsed and how it's done (e.g. keep or remove continents?) and also perhaps be given a way to adjust the parsing behavior.

Thanks!

Originally created by @guillaume-millot on GitHub (Mar 19, 2024). I've parsed the following PDF consisting of 2 tables: [ENI_2018_p12-13.pdf](https://github.com/run-llama/llama_parse/files/14650447/ENI_2018_p12-13.pdf) The two tables have the same schema and include financial metrics per country & per continent ("EUROPE", etc.) and for the whole company "Eni Group" (bottom of 2nd table). Here's the parsing results exported to PDF: [ENI_2018_p12-13_parsed.pdf](https://github.com/run-llama/llama_parse/files/14650450/ENI_2018_p12-13_parsed.pdf) ``` # Code snippet of parsing task json_objs = LlamaParse(verbose=True).get_json_result(document_path) dfs = [] for page in json_objs[0]["pages"]: for item in page["items"]: if item['type'] == 'table': df = pd.DataFrame(item["rows"][1:], columns=item["rows"][0]) dfs.append(df) ``` A few observations: 1. First column "Full year 2018" was renamed to "Country" 2. Continent rows in table 1 ("EUROPE", "AFRICA") were removed, BUT not in table 2 ("ASIA AND OCEANIA", "AMERICAS" still there) 3. "Eni Group" row in table 2 is still there 4. Column "Total revenues" was renamed to "Total revenues (€ thousand)", but only on this column, and only in Table 1 My questions: 1. Do you have a kind of semantic/understanding layer in your parsing? 2. Could you explain the delta in parsing between table 1 and table 2 As a user, I'm not sure what to expect. For example, on one side, I love it that you renamed "Full year 2018" to "Country" as this new name seems closer to what the column really is about. However, in that case, I believe I would expect a consistent behavior in what is parsed and how it's done (e.g. keep or remove continents?) and also perhaps be given a way to adjust the parsing behavior. Thanks!
yindo closed this issue 2026-02-16 00:16:44 -05:00
Author
Owner

@BinaryBrain commented on GitHub (Jul 16, 2024):

Hi! Sorry for the delay and thanks for your comments and questions.
While your table is quite standard, LlamaParse needs to be working on a wide variety of tables. Our pipeline use different methods to ensure we get the best quality but discrepancies can still appear.

We recently release our latest API version and it should fix this one.

@BinaryBrain commented on GitHub (Jul 16, 2024): Hi! Sorry for the delay and thanks for your comments and questions. While your table is quite standard, LlamaParse needs to be working on a wide variety of tables. Our pipeline use different methods to ensure we get the best quality but discrepancies can still appear. We recently release our latest API version and it should fix this one.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/llama_cloud_services#54