+
Skip to content

Conversation

Soeb-aryn
Copy link
Contributor

Changes:

  1. Updated the prompt to support key-value tables where all keys are set to null.
  2. Fixed a bug causing the raw_answer variable to reset improperly.

@Soeb-aryn Soeb-aryn changed the title Sh extract table propertie prompt bug fix extract table properties prompt & bug fix Nov 22, 2024
@Soeb-aryn Soeb-aryn marked this pull request as ready for review November 22, 2024 22:51
@Soeb-aryn Soeb-aryn requested a review from bohou-aryn November 23, 2024 00:03
Parse the CSV table, check the image, and return a flattened JSON object representing the key-value pairs from the table. The extracted key-value pairs should be formatted as a JSON object.
Do not return nested objects; keep the dictionary only one level deep. The only valid value types are numbers, strings, None, and lists.
Use camelCase for the key names.
A table can have multiple or all null values for a key. In such cases, return a JSON object with the specified key set to null for all rows in the table.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to handle empty cell case specially? in the prompt we sent to the llm, I would expect if our table representation could indicate the difference.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried without explicitly mentioning this, but it didn’t work. Adding this line ensures it works consistently.

@Soeb-aryn Soeb-aryn requested a review from bohou-aryn November 25, 2024 22:15
@Soeb-aryn Soeb-aryn merged commit 5953bf0 into main Nov 26, 2024
12 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载