Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show parsing state in the playground. When dropping fields for example #702

Open
hellovai opened this issue Jun 20, 2024 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@hellovai
Copy link
Contributor

The rows field is dropped: TODO figure out why.

https://www.promptfiddle.com/Parse-Image-UTWNb

Here is the extracted data from the table in JSON format:

```json
{
  "headers": [
    "No. of establishments (1963.12.31)",
    "No. of workers (1963.12.31)",
    "Output (1963.1.1~1963.12.31)",
    "Value of shipments (1963.1.1~1963.12.31)",
    "Production costs (1963.1.1~1963.12.31)",
    "Value added (1963.1.1~1963.12.31)"
  ],
  "columns": [
    "Total",
    "5-9",
    "10-19",
    "20-29",
    "30-49",
    "50-99",
    "100-199",
    "200-499",
    "500 and above"
  ],
  "rows": [
    [18310, 401981, 166857471, 163199452, 105323904, 61533567],
    [10132, 60564, 16925825, 16759437, 10939674, 5986151],
    [4581, 36038, 18871885, 18920639, 11906389, 6832271],
    [1387, 30500, 10187044, 9930658, 6836101, 3319350],
    [965, 34258, 12345164, 12210238, 8168539, 4216625],
    [713, 46811, 20317965, 21317448, 13862461, 6019839],
    [295, 38651, 19058913, 19597913, 12877183, 6719730],
    [165, 45767, 22734463, 22667817, 15796718, 6861489],
    [72, 89932, 46463544, 45162100, 26072300, 80258480]
  ]
}
\(remove <-this last \)```

Parsed:

{
headers: [
0: "No. of establishments (1963.12.31)"
1: "No. of workers (1963.12.31)"
2: "Output (1963.1.1~1963.12.31)"
3: "Value of shipments (1963.1.1~1963.12.31)"
4: "Production costs (1963.1.1~1963.12.31)"
5: "Value added (1963.1.1~1963.12.31)"
]
columns: [
0: "Total"
1: "5-9"
2: "10-19"
3: "20-29"
4: "30-49"
5: "50-99"
6: "100-199"
7: "200-499"
8: "500 and above"
]
row: [
]
}
class Table {
  headers string[]
  columns string[]
  row int[][] @description(#"
    The rows of the table, each containing the data for each column.
  "#)
}
@hellovai hellovai added the bug Something isn't working label Jun 22, 2024
@hellovai
Copy link
Contributor Author

This issue is not a parsing failure, but rather the fact that the field had the word row but the llm output rows. We should consider exposing better errors up.

In this case we successfully parsed, but only because lists have a default value of an empty list when not found.

@hellovai hellovai changed the title Parsing Failure Jun 22, 2024
@hellovai hellovai added enhancement New feature or request and removed bug Something isn't working labels Jun 22, 2024
@aaronvg
Copy link
Contributor

aaronvg commented Jun 26, 2024

omg this couldve been caught by an AI linter (or even a programmatic one)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
2 participants