Commit ·
b593b0a
1
Parent(s): 0c6032c
Fix typos in table extraction prompts
Browse filesCo-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- chat_template.jinja +3 -3
chat_template.jinja
CHANGED
|
@@ -2,9 +2,9 @@
|
|
| 2 |
{%- set chart2code_prompt = "Generate code that recreates the chart as best as possible." -%}
|
| 3 |
{%- set chart2csv_prompt = "Please examine this chart image. Consider you are a data visualization expert, and extract the data into a CSV table.\n\nYour CSV should:\n- Include a header row with clear column names\n- Represent all data series/categories shown in the chart\n- Use numeric values that match the chart as closely as possible\n\nOutput only the CSV data, nothing else." -%}
|
| 4 |
{%- set chart2summary_prompt = "Can you describe this chart image?" -%}
|
| 5 |
-
{%- set tables_json_prompt = "Identify and extract the
|
| 6 |
-
{%- set tables_html_prompt = "Identify and extract the
|
| 7 |
-
{%- set tables_otsl_prompt = "Identify and extract the
|
| 8 |
|
| 9 |
|
| 10 |
{#- ===== Tag expansion dispatcher ===== -#}
|
|
|
|
| 2 |
{%- set chart2code_prompt = "Generate code that recreates the chart as best as possible." -%}
|
| 3 |
{%- set chart2csv_prompt = "Please examine this chart image. Consider you are a data visualization expert, and extract the data into a CSV table.\n\nYour CSV should:\n- Include a header row with clear column names\n- Represent all data series/categories shown in the chart\n- Use numeric values that match the chart as closely as possible\n\nOutput only the CSV data, nothing else." -%}
|
| 4 |
{%- set chart2summary_prompt = "Can you describe this chart image?" -%}
|
| 5 |
+
{%- set tables_json_prompt = "Identify and extract the table schema\n Extract the schema of all the tables in the image sorted according to the reading order.\nThe output must be a valid JSON object containing a list of dictionaries with the following structure:\n\n {\n \"dimensions\": {\n \"rows\": <number of data rows (excluding header rows)>,\n \"columns\": <number of columns>,\n \"header_rows\": <number of header rows>,\n \"total_rows\": <total number of rows including headers>\n },\n \"cells\": [\n {\n \"row\": <row index starting at 1>,\n \"col\": <column index starting at 1>,\n \"colspan\": <number of columns spanned>,\n \"rowspan\": <number of rows spanned>,\n \"type\": \"<'header' or 'data'>\",\n \"header_level\": <header nesting level if type=header, else omit or null>,\n \"content\": \"<string content of the cell>\"\n },\n ...\n ]\n }" -%}
|
| 6 |
+
{%- set tables_html_prompt = "Identify and extract the table schema\n Extract the schema of all the tables in the image sorted according to the reading order.\nThe output must be a list of valid HTML tables" -%}
|
| 7 |
+
{%- set tables_otsl_prompt = "Identify and extract the table schema\n Extract the schema of all the tables in the image sorted according to the reading order.\nThe output must be a list of valid OTSL objects, each consists of the following fields: \n <fcel> - a cell with content in it\n <ecel> - an empty cell\n <lcel> - a cell that is merged with the cell to its left\n <ucel> - a cell that is merged with the cell above it\n <xcel> - a cell that is merged with both the cell above it and the cell to its left\n <nl> - a new line\n <ched> - a column header\n <otsl> - the beginning of the OTSL table\n </otsl> - the end of the OTSL table\n\n An example for an output:\n [\n <otsl><ched>first table header1<ched>first table header2<nl><fcel>data1<fcel>data2<nl><fcel>data with horizontal span<lcel><nl><fcel>data with vertical span<ecel><nl><ucel><fcel>data3<nl></otsl>,\n <otsl><ched>second table header1<ched>second table header2<nl><fcel>data1<fcel>data2<nl><fcel>data with horizontal span<lcel><nl><fcel>data with vertical span<ecel><nl><ucel><fcel>data3<nl></otsl>\n ]" -%}
|
| 8 |
|
| 9 |
|
| 10 |
{#- ===== Tag expansion dispatcher ===== -#}
|