spreadsheetlabeller / LABELING_GUIDE.md
zofiasmolenasana
Merge value+attribute labels, add header label, RAG eval improvements
d051588 unverified
|
Raw History Blame Contribute Delete
54.9 kB
# Labeling Guide for Spreadsheet Annotators
## What you are doing and why
You are labeling cells in spreadsheets so that a machine-learning pipeline can learn to understand them automatically. Your labels are used two ways:
1. **Training a graph neural network** that predicts cell roles (header, value, metadata, etc.).
2. **Extracting text chunks** that an LLM can search and reason over.
The quality of the chunks depends entirely on the quality of your labels. A mislabeled header means every value under it loses its meaning.
---
## Quick reference
| Key | Label | Use for |
|-----|-------|---------|
| **V** | `value` | Any data cell — numeric or text (measurement, name, code, status) |
| **H** | `header` | Table title, section heading — gives context to the data below |
| **R** | `row_header` | A label on the left that names a row or group of rows (at active level) |
| **Shift+R** | `row_header` | Same, but one level above active (group header shortcut) |
| **C** | `col_header` | A label at the top that names a column or group of columns (at active level) |
| **Shift+C** | `col_header` | Same, but one level above active |
| **A** | `aggregation` | A cell whose value is computed from other cells (SUM, AVERAGE, etc.) |
| **M** | `metadata` | Footnotes, source notes, disclaimers, dates — not table titles (use H for titles) |
| **N** | `comment` | An inline comment/footnote written in a cell (not Excel's built-in comment) |
| **E** | `empty` | A cell that is intentionally blank (structural spacer) |
| **J** | `junk` | Useless/erroneous content to discard (e.g. "Unnamed 1") |
| **X** | *(clear)* | Remove a label you placed by mistake |
### Selection
- **Click** a cell to select it.
- **Shift+click** to select a rectangular range from the last click.
- **Ctrl/Cmd+click** to toggle individual cells in/out of the selection.
- Then press a label key to apply it to the entire selection.
### Tables
Each sheet can contain one or more **tables** (separate data grids). You must tell the system which cells belong to which table.
- **T0** = sheet-level (not inside any table). Use for sheet titles and section headings (`header`), footnotes and disclaimers (`metadata`), and other content that belongs to the sheet as a whole.
- **T1, T2, ...** = individual tables within the sheet.
Set the active table before labeling cells:
- Click a table button in the **Table** bar, or
- Press **T** then type the table number (e.g. **T** **1** **2** for T12).
To add more tables, click the **[+]** button. There is no limit on the number of tables.
Every cell you label is stamped with the currently active table ID. If you label a cell as `value` while T2 is active, that cell belongs to table 2.
### Header levels
Row and column headers can have multiple levels of hierarchy. The **Level** bar controls which level the **R** and **C** keys assign.
- **L1** = innermost / most specific header (default). Start here.
- **L2** = broader grouping that contains L1.
- **L3, L4, ...** = even broader groupings.
Set the active level:
- Click a level button in the **Level** bar, or
- Press **L** then type the level number (e.g. **L** **1** **2** for L12).
To add more levels, click the **[+]** button.
### Save
Press **Enter** or click **SAVE & NEXT** to save your labels and load the next sheet.
---
## Label definitions in detail
### `value` (V)
A data cell inside the table grid — numeric **or** text — that holds observed (non-derived) content: measurements, amounts, names, codes, status text, categorical entries, and any other recorded value. Use **`value`** for all such cells; do not split text vs. number into separate label types.
Examples: `50000`, `12.5%`, `$1,200`, `3.14`, `John Smith`, `Active`, `Warsaw`, `PL-2024-001`.
How chunks are built depends on layout: many numeric cells produce **one chunk per cell**, with the full path of row and column headers. Rows of text fields are often grouped into **record-style chunks**, with each field keyed by its column header — so column headers must be correct.
### `header` (H)
Table titles, section headings, and other headings that sit **outside** the data grid and give context for what follows — for example a sheet title, a table caption, or a block heading like "Income Statement". This is **not** the same as **`row_header`** / **`col_header`** (labels that name rows or columns inside the grid).
Use **`header`** for titles and headings. Use **`metadata`** only for footnotes, source notes, disclaimers, and similar notes — not for titles.
**Sheet vs. table:** Use the table ID to distinguish scope.
- **T0 + header** = sheet-level title or main section headings for the whole sheet.
- **T1 + header** (or T2, T3...) = title or section heading for that specific table.
These headings are included in chunk output so downstream models see what each region represents.
### `row_header` (R / Shift+R)
A label cell that names a row or group of rows. Usually on the left side of a table.
Row headers come in two layouts:
**Horizontal** — multi-level row headers sit in **separate columns** on the same row, broadest on the far left (highest level number):
```
┌──────────────┬────────────┬──────────┬───────┐
│ Region │ Country │ City │ Sales │
│ (R level 3) │ (R level 2)│(R level 1)│ (V) │
├──────────────┼────────────┼──────────┼───────┤
│ Europe │ Poland │ Warsaw │ 100 │
│ │ │ Kraków │ 80 │
│ │ Germany │ Berlin │ 120 │
│ Asia │ Japan │ Tokyo │ 200 │
└──────────────┴────────────┴──────────┴───────┘
```
The system scans **leftward** from each data cell, picking up every row header it encounters. For the Warsaw row: `Row: Europe > Poland > Warsaw`.
**Vertical** — a broader group header sits on **its own row above** the detail rows (common in financial reports / SAP exports). The group row often has aggregation values:
```
Q1 Q2
┌────────┬────────┐
Revenue │ 50000 │ 60000 │ ← Shift+R (R level 2), data = A
├────────────┼────────┼────────┤
│ Products │ 30000 │ 35000 │ ← R (R level 1), data = V
│ Services │ 20000 │ 25000 │ ← R (R level 1), data = V
└────────────┴────────┴────────┘
```
The system scans leftward **then upward**, finding broader group headers above the data row. For Products: `Row: Revenue > Products`. See "Vertical row headers" in Common mistakes for the full labeling workflow.
Rules:
- **L1** = most specific (closest to data). The column closest to data or the detail row header.
- **L2, L3, ...** = broader groupings. The column further left, or a group header row above.
- Press **R** to label at the active level. Press **Shift+R** to label one level above the active level (quick shortcut for group headers — no need to switch levels).
- If a row header cell spans multiple rows (merged cell), label the merged cell once — it covers all the rows it spans.
- If a row header is left blank because the value above it is understood to repeat (like "Europe" covering Poland and Germany), label the *visible* cell, not the blank ones. The system handles this via the scan.
### `col_header` (C / Shift+C)
A label cell at the top of a table that names a column or group of columns.
Multi-level column headers are stacked in **separate rows**, with the broadest category on top (highest level number):
```
┌────────────────────────────────┐
│ 2024 Revenue │ ← C level 3 (merged across)
├───────────┬────────────────────┤
│ Q1 │ Q2 │ ← C level 2
├─────┬─────┼──────┬────────────┤
│ Jan │ Feb │ Mar │ Apr │ ← C level 1
├─────┼─────┼──────┼────────────┤
│ 100 │ 120 │ 130 │ 140 │ ← values
└─────┴─────┴──────┴────────────┘
```
The system finds a value's column headers by scanning **upward**. For the Jan column, the chunk reads: `Column: 2024 Revenue > Q1 > Jan`.
Rules:
- **L1** = bottommost row of headers (closest to data). **L2, L3, ...** = rows further up (broader).
- Press **C** to label at the active level. Press **Shift+C** to label one level above the active level.
- Merged header cells that span multiple columns: label the merged cell once.
### `aggregation` (A)
A cell whose value is computed from other cells — typically SUM, AVERAGE, COUNT, or any formula result. Use this for total rows, subtotal rows, computed percentages, and any cell that derives its value from other data cells.
Examples: a "Total" row at the bottom of a table, a "Grand Total" column, a weighted average, a percentage computed from two other cells.
The system reads the formula from the original Excel file automatically. You only need to label the cell as `aggregation`; the formula text, resolved references, and aggregation type are extracted without your involvement.
Do **not** label aggregation cells as `value`. Even though they contain numbers, they are derived, not observed. The distinction matters for chunk output (aggregation chunks include formula context) and for training (the GNN learns the difference).
**Aggregation vs. multi-level row headers:** If you see rows like "Salaries", "Benefits", "Rent" followed by a bolded "Total" row with a SUM formula, the total is `aggregation`. The items above it are `value`. The "Total" text in the leftmost column is a `row_header` for that aggregation row. Do not make "Salaries" a sub-level of "Total" — they are independent row headers at the same level, and the formula captures their relationship.
### `metadata` (M)
Footnotes, source notes, date stamps, disclaimers, author or version lines, and other contextual text **outside** the data grid — **not** table titles or section headings (those are **`header`**, **H**).
Examples: "As of 2024-03-15", "Source: Ministry of Finance", "* Revised figures", a global disclaimer.
**Sheet metadata vs. table metadata:** This distinction is made via the table ID, not the label.
- **T0 + metadata** = sheet-level notes that apply to the whole sheet (e.g. a disclaimer or date covering all tables).
- **T1 + metadata** (or T2, T3...) = notes tied to that specific table (e.g. a footnote that applies only to that table).
Both are included in the chunk output: sheet metadata appears in every chunk, table metadata appears only in chunks from that table.
### `comment` (N) — Inline comment / footnote
A cell that contains a textual annotation, footnote, or note that **refers to another cell** but was written in a neighboring cell rather than using Excel's built-in comment feature. Spreadsheet authors often place footnotes like `*estimated`, `see appendix`, or `revised Q3` in cells next to the data they describe.
Examples: `*dane szacunkowe`, `see note 3`, `revised`, `Source: internal report`.
**How it works:**
1. Select the cell containing the comment text.
2. Press **N** — the cell turns yellow with a dashed border.
3. A banner appears at the bottom: *"Click the cell this comment refers to"*.
4. Click the target cell the note annotates (often a value cell).
5. A dashed orange arrow appears connecting the comment to its target.
6. Press **Esc** to cancel linking without removing the label.
**What happens in the output:** The comment text is injected into the chunk of the target cell with a `Note:` prefix. This way the LLM sees the annotation in context, and attribution is unambiguous:
```
Column: Revenue > Q1
Row: Poland
Value: 1500000
Note: *estimated, pending audit
```
**Comment vs. header vs. metadata:** Use `header` for table titles and section headings. Use `metadata` for footnotes, source lines, disclaimers, and sheet-wide dates — not for titles. Use `comment` for annotations that refer to a *specific cell* — things like footnotes, corrections, or qualifiers typed beside the data.
**Excel built-in comments:** If a cell already has an Excel comment (shown as an orange triangle in the top-right corner), it is extracted automatically — no labeling needed. The `comment` label is only for text that someone typed into a *regular cell* as a note.
### `empty` (E)
A cell that is deliberately blank for layout purposes — a spacer row, a blank column between tables, a padding cell. Not all blank cells need this label; only use it when the empty space is structurally meaningful (e.g., separating two tables).
You can usually skip labeling truly empty cells. Any non-empty cell that you don't label at all gets saved as `unlabeled`.
### `junk` (J)
A cell containing useless or erroneous content that should be **discarded** when building chunks. These are cells that obviously ended up in the spreadsheet by mistake or carry no meaningful information.
Examples:
- Auto-generated placeholder headers: `Unnamed: 0`, `Unnamed 1`, `Column1`, `Field1`
- Corrupted or garbled text
- Test/debug data left behind accidentally
- Duplicated artifact cells
Junk cells are **completely ignored** during chunk extraction — they produce no chunks, are not used as headers, and do not appear in any output. The GNN also learns to recognize them so they can be filtered automatically in prediction.
**Junk vs. empty:** Use `empty` for intentionally blank spacer cells. Use `junk` for cells that *have content* but that content is meaningless or erroneous.
**Junk vs. unlabeled:** If you skip a cell (don't label it), it is saved as `unlabeled` — meaning you haven't decided what it is. `junk` is an explicit decision that the content is worthless and should be thrown away.
---
## How to handle multiple tables on one sheet
Many real spreadsheets place several tables on a single sheet, separated by blank rows/columns or titles. You **must** assign different table IDs to each.
### Step-by-step
1. Look at the sheet and identify distinct data grids. Each grid with its own headers is a separate table.
2. Identify any sheet-level content (overall title, date, footnotes). This goes to **T0**.
3. Switch to **T1** and label all cells belonging to the first table (its headers, values, aggregations).
4. Switch to **T2** and label all cells belonging to the second table.
5. Repeat for more tables if present. Click **[+]** to add T3, T4, etc.
### Why this matters
- The GNN builds a **separate sub-graph** per table. Cells from different tables are not connected, so wrong table assignments corrupt the graph structure.
- The chunk builder only generates chunks for cells in T1+. T0 `header` and `metadata` cells are attached to every table's chunks. If you accidentally put a value cell in T0, it will not produce a chunk at all.
- Row/column header scanning stops at table boundaries. If two tables share a border and you assign them the same table ID, headers from one table will bleed into the other's chunks.
### Example
```
Row 1: "Financial Summary 2024" ← H (T0: sheet title)
Row 2: (blank)
Row 3: "Income Statement" ← H (T1: table title)
Row 4: "Category" | "Q1" | "Q2" | "Q3" ← R1 + C1 C1 C1 (T1)
Row 5: "Revenue" | 500 | 600 | 700 ← R1 + V V V (T1)
Row 6: "Expenses" | 300 | 350 | 400 ← R1 + V V V (T1)
Row 7: "Profit" | 200 | 250 | 300 ← R1 + A A A (T1, formulas)
Row 8: (blank)
Row 9: "Balance Sheet" ← H (T2: table title)
Row 10: "Item" | "Amount" ← R1 + C1 (T2)
Row 11: "Assets" | 5000 ← R1 + V (T2)
Row 12: "Liab." | 3000 ← R1 + V (T2)
```
---
## Non-standard header layouts
Most spreadsheets have column headers **above** data and row headers **to the left**. The system also supports tables where this convention is reversed:
- **Headers below data** — column headers sit underneath the values instead of above them.
- **Headers to the right of data** — row headers appear to the right of the values instead of to the left.
**How it works:** The system detects the header orientation automatically for each table by comparing the position of header cells against data cells. You label headers exactly the same way (`C` for column headers, `R` for row headers) regardless of where they sit — the system figures out the direction.
**Important:** If a table has headers both above *and* below data (e.g., headers in the middle of a data region), split it into two separate tables (T1, T2). The system determines one orientation per table, so mixing directions within a single table will produce unreliable results.
### Example: headers to the right
```
┌───────┬───────┬────────────┐
│ 100 │ 200 │ Revenue │ ← R level 1 (to the right)
│ 50 │ 80 │ Expenses │ ← R level 1
│ 50 │ 120 │ Profit │ ← R level 1
├───────┼───────┼────────────┤
│ Q1 │ Q2 │ │ ← C level 1 (below data, closest to data)
└───────┴───────┴────────────┘
```
Label the cells the same way as always: `Revenue`, `Expenses`, `Profit` → **R1**; `Q1`, `Q2` → **C1**; numeric cells → **V**. The system will detect that column headers are below and row headers are to the right, and produce correct chunks like `Column: Q1 > Row: Revenue > Value: 100`.
---
## Common mistakes to avoid
### 1. Forgetting to switch tables
If you label the first table on T1 and then forget to switch to T2 for the second table, all cells will appear to be in one huge table. Headers from table 1 will contaminate table 2's chunks.
**Fix:** Always check the Table bar before labeling a new region.
### 2. Labeling aggregation cells as value
A cell with `=SUM(...)` or `=AVERAGE(...)` should be `aggregation`, not `value`. The system extracts formula context for aggregation cells but not for value cells. If you label a SUM total as value, the chunk will lose its formula information.
### 3. Wrong header level
If a sheet has two levels of column headers (e.g., "2024" spanning Q1-Q4, then "Q1", "Q2", "Q3", "Q4" below), the bottom row is **level 1** (most specific) and the top row is **level 2** (broader). Getting this backwards inverts the hierarchy in chunks.
**Rule of thumb:** most specific = level 1, broader groupings = higher numbers.
### 4. Confusing row header levels with aggregation
Multi-level row headers are in **separate columns** or **separate rows** (see vertical row headers below). If you see vertically stacked rows in the *same* column — like "Salaries", "Benefits", then "Total" below — those are *not* header levels. "Salaries" and "Benefits" are row headers (level 1), and "Total" is a row header for an aggregation row. The hierarchy among them is captured by the formula, not by header levels.
### Vertical row headers (grouping rows above data)
A common pattern (especially in financial reports and SAP exports) uses a **group header on its own row** above the detail rows. The group row often also contains **aggregation values** (totals/subtotals for the detail rows below):
```
Q1 Q2
┌────────┬────────┐
Revenue │ 50000 │ 60000 │ ← Shift+R (R level 2), data cells = A (aggregation)
├────────────┼────────┼────────┤
│ Products │ 30000 │ 35000 │ ← R (R level 1), data cells = V (value)
│ Services │ 20000 │ 25000 │ ← R (R level 1), data cells = V (value)
├────────────┼────────┼────────┤
Expenses │ 40000 │ 45000 │ ← Shift+R (R level 2), data cells = A (aggregation)
├────────────┼────────┼────────┤
│ Salaries │ 25000 │ 28000 │ ← R (R level 1), data cells = V (value)
│ Rent │ 15000 │ 17000 │ ← R (R level 1), data cells = V (value)
└────────────┴────────┴────────┘
```
The resulting chunks:
- `Row: Revenue > Products`, Column: Q1, Value: 30000
- `Row: Revenue`, Column: Q1, AGGREGATION: 50000
- `Row: Expenses > Salaries`, Column: Q1, Value: 25000
- etc.
**How to label (workflow):**
1. Label all **detail row headers** first: select cells like "Products", "Services", "Salaries", "Rent" and press **R** (assigns R level 1 at the default active level).
2. Label the **group headers**: select "Revenue" and "Expenses" and press **Shift+R** (assigns R level 2, one level above the active level — no need to switch levels manually).
3. Label the **data cells**: detail row values → **V**, group row totals → **A** (aggregation, even without formulas — e.g., in SAP-generated sheets the totals may be static values).
4. Label the **column headers** ("Q1", "Q2") → **C**.
The system handles the rest: after scanning leftward on the data row, it scans **upward** to find broader row headers (higher level numbers). The aggregation cells on the group row are skipped during the scan, not treated as boundaries.
**If the pattern has three levels** (e.g., Total Company > Revenue > Products):
```
Total Company │ 100000 │ ← Shift+R twice or L3+R (R level 3), data = A
├─────────────┼────────┤
│ Revenue │ 50000 │ ← Shift+R (R level 2), data = A
│ ├───────────┼────────┤
│ │ Products │ 30000 │ ← R (R level 1), data = V
│ │ Services │ 20000 │ ← R (R level 1), data = V
├─────────────┼────────┤
│ Expenses │ 40000 │ ← Shift+R (R level 2), data = A
│ ├───────────┼────────┤
│ │ Salaries │ 25000 │ ← R (R level 1), data = V
│ │ Rent │ 15000 │ ← R (R level 1), data = V
└─────────────┴────────┘
```
For 3+ levels, set the active level to L2 first, then Shift+R gives L3. Or use **L** then **3** then **R** directly.
Rules:
- The group header gets a **higher level number** than the detail headers below it (e.g., L2 for the group, L1 for the details).
- **Shift+R** is the quickest way: it assigns one level above the active level without switching.
- The group header can be in the same column or in a column to the left of the detail headers.
- The data cells on the group row should be labeled **A** (aggregation), even if they lack formulas. The group row is a summary, and the system will give it the correct row header context.
- Empty rows between the group header and the detail rows are fine — the scan skips them.
- This pattern can nest: L3 group above L2 groups above L1 details.
### 5. Putting data in T0
T0 is for sheet-level headings (`header`), footnotes, and other sheet-wide notes (`metadata`) — not for data inside a table. Any `value`, `row_header`, `col_header`, or `aggregation` cell placed in T0 will **not** produce a chunk and will not be connected to any table's graph.
### 6. Not labeling empty spacer rows
If there are blank rows or columns separating two tables, label them as `empty` (any table ID is fine). This helps the model learn structural boundaries.
### 7. Labeling inline footnotes as metadata instead of comment
If you see a cell like `*revised` or `see note 3` next to a data cell, do **not** label it as `metadata`. Use `header` for titles and `metadata` for general footnotes or source lines; footnotes that refer to a **specific** data cell should be labeled `comment` and linked to their target. This ensures the note appears in the correct chunk, not in every chunk on the sheet.
### 8. Forgetting to link a comment to its target
If you label a cell as `comment` but don't click the target cell, the comment text will not be attached to any chunk. Always complete the linking step — the banner at the bottom reminds you.
---
## Self-check before saving
Before pressing Enter, quickly verify:
- [ ] Every data cell has a label (value or aggregation).
- [ ] Every header cell has the correct label and level.
- [ ] Tables are separated by different table IDs (check the colored dots on cells).
- [ ] Sheet-level titles are `header` on T0; table titles are `header` on that table's ID; sheet/table footnotes and notes use `metadata` where appropriate.
- [ ] Aggregation cells (bold totals, formula cells) are labeled A, not V.
- [ ] The header hierarchy makes sense: level 1 is the most specific, higher levels are broader groupings.
- [ ] Inline footnotes/annotations are labeled as `comment` (N), not `metadata`, and linked to their target cell (orange arrow visible).
---
## Keyboard shortcut summary
| Shortcut | Action |
|----------|--------|
| **V** | Label as value |
| **H** | Label as header (table title / section heading) |
| **R** | Label as row_header (at active level) |
| **Shift+R** | Label as row_header one level above active (group header shortcut) |
| **C** | Label as col_header (at active level) |
| **Shift+C** | Label as col_header one level above active |
| **A** | Label as aggregation |
| **M** | Label as metadata |
| **N** | Label as comment (then click target cell to link) |
| **E** | Label as empty |
| **J** | Label as junk (discarded from chunks) |
| **X** | Clear label |
| **T** then digits | Set active table (e.g. T, 1, 2 for T12) |
| **L** then digits | Set active header level (e.g. L, 5 for L5) |
| **Esc** | Cancel comment linking |
| **Enter** | Save & load next sheet |
| **Shift+click** | Range select |
| **Ctrl/Cmd+click** | Toggle select |
---
---
# Instrukcja labelowania arkuszy
## Co robisz i dlaczego
Oznaczasz komórki w arkuszach kalkulacyjnych, aby system uczenia maszynowego mógł automatycznie rozumieć ich strukturę. Twoje etykiety służą do dwóch celów:
1. **Trenowanie sieci neuronowej (GNN)**, która przewiduje role komórek (nagłówek, wartość, metadane itp.).
2. **Wyodrębnianie fragmentów tekstu (chunków)**, po których LLM może wyszukiwać i wnioskować.
Jakość chunków zależy całkowicie od jakości Twoich etykiet. Źle oznaczony nagłówek oznacza, że każda wartość pod nim traci swoje znaczenie.
---
## Szybka ściąga
| Klawisz | Etykieta | Do czego |
|---------|----------|----------|
| **V** | `value` | Dowolna komórka z danymi — liczbowa lub tekstowa (pomiar, nazwa, kod, status) |
| **H** | `header` | Tytuł tabeli, nagłówek sekcji — daje kontekst danym poniżej |
| **R** | `row_header` | Nagłówek wiersza — etykieta po lewej stronie (na aktywnym poziomie) |
| **Shift+R** | `row_header` | Nagłówek wiersza jeden poziom wyżej niż aktywny (skrót dla nagłówka grupy) |
| **C** | `col_header` | Nagłówek kolumny — etykieta na górze (na aktywnym poziomie) |
| **Shift+C** | `col_header` | Nagłówek kolumny jeden poziom wyżej niż aktywny |
| **A** | `aggregation` | Komórka obliczeniowa (SUMA, ŚREDNIA, formuła) |
| **M** | `metadata` | Przypisy, źródło, zastrzeżenia, daty — nie tytuły tabel (tytuły → H) |
| **N** | `comment` | Komentarz/przypis wpisany w komórkę (nie wbudowany komentarz Excela) |
| **E** | `empty` | Celowo pusta komórka (odstęp strukturalny) |
| **J** | `junk` | Bezużyteczna/błędna treść do odrzucenia (np. „Unnamed 1") |
| **X** | *(wyczyść)* | Usuń błędnie nadaną etykietę |
### Zaznaczanie
- **Kliknij** komórkę, aby ją zaznaczyć.
- **Shift+klik** — zaznacz prostokątny zakres od ostatniego kliknięcia.
- **Ctrl/Cmd+klik** — dodaj/usuń pojedyncze komórki z zaznaczenia.
- Naciśnij klawisz etykiety, aby zastosować ją do całego zaznaczenia.
### Tabele
Każdy arkusz może zawierać jedną lub więcej **tabel** (oddzielnych siatek danych). Musisz wskazać systemowi, które komórki należą do której tabeli.
- **T0** = poziom arkusza (poza tabelami). Dla tytułów i nagłówków sekcji (`header`), przypisów i zastrzeżeń (`metadata`) oraz innej treści odnoszącej się do całego arkusza.
- **T1, T2, ...** = poszczególne tabele w arkuszu.
Ustaw aktywną tabelę przed labelowaniem:
- Kliknij przycisk tabeli w pasku **Table**, lub
- Naciśnij **T**, potem wpisz numer tabeli (np. **T** **1** **2** dla T12).
Aby dodać więcej tabel, kliknij **[+]**. Nie ma limitu liczby tabel.
Każda etykietowana komórka otrzymuje ID aktywnej tabeli. Jeśli oznaczysz komórkę jako `value` przy aktywnym T2, ta komórka trafia do tabeli 2.
### Poziomy nagłówków
Nagłówki wierszy i kolumn mogą mieć wiele poziomów hierarchii. Pasek **Level** kontroluje, który poziom przypisują klawisze **R** i **C**.
- **L1** = najbardziej szczegółowy / najbliższy danych nagłówek (domyślny). Zacznij tutaj.
- **L2** = szersze grupowanie, obejmujące L1.
- **L3, L4, ...** = jeszcze szersze grupowania.
Ustaw aktywny poziom:
- Kliknij przycisk w pasku **Level**, lub
- Naciśnij **L**, potem wpisz numer poziomu (np. **L** **1** **2** dla L12).
Aby dodać więcej poziomów, kliknij **[+]**.
### Zapisywanie
Naciśnij **Enter** lub kliknij **SAVE & NEXT**, aby zapisać etykiety i wczytać następny arkusz.
---
## Szczegółowe definicje etykiet
### `value` (V) — Wartość
Komórka wewnątrz siatki danych — liczbowa **lub** tekstowa — zawierająca zaobserwowane (niepochodne) dane: pomiary, kwoty, nazwy, kody, statusy, tekst kategoryczny itd. Używaj **`value`** dla wszystkich takich komórek; nie rozdzielaj liczb i tekstu na osobne typy etykiet.
Przykłady: `50000`, `12,5%`, `1 200 zł`, `3,14`, `Jan Kowalski`, `Aktywny`, `Warszawa`, `PL-2024-001`.
Sposób budowania chunków zależy od układu: wiele komórek liczbowych daje **jeden chunk na komórkę** z pełną ścieżką nagłówków. Wiersze pól tekstowych często grupują się w **chunki rekordowe**, z kluczem z nagłówka kolumny — dlatego nagłówki kolumn muszą być poprawne.
### `header` (H) — Tytuł / nagłówek sekcji
Tytuły tabel, nagłówki sekcji i inne nagłówki **poza** siatką danych, które dają kontekst dla treści poniżej — np. tytuł arkusza, podpis tabeli, blok „Rachunek zysków i strat”. To **nie** to samo co **`row_header`** / **`col_header`** (etykiety wierszy i kolumn w siatce).
Tytuły i nagłówki sekcji oznaczaj jako **`header`**. **`metadata`** zarezerwuj na przypisy, noty źródłowe, zastrzeżenia — nie na tytuły.
**Arkusz vs. tabela:** Zakres wynika z ID tabeli.
- **T0 + header** = tytuł na poziomie całego arkusza lub główne nagłówki sekcji.
- **T1 + header** (lub T2, T3...) = tytuł lub nagłówek sekcji dla danej tabeli.
Te nagłówki trafiają do chunków, aby model widział, czego dotyczą dane.
### `row_header` (R / Shift+R) — Nagłówek wiersza
Komórka-etykieta nazywająca wiersz lub grupę wierszy. Zwykle po lewej stronie tabeli.
Nagłówki wierszy występują w dwóch układach:
**Poziomy** — wielopoziomowe nagłówki wierszy w **osobnych kolumnach** w tym samym wierszu, najszersza kategoria po lewej (najwyższy numer poziomu):
```
┌──────────────┬────────────┬──────────┬───────┐
│ Region │ Kraj │ Miasto │ Sprze │
│ (R poz. 3) │ (R poz. 2) │(R poz. 1)│ (V) │
├──────────────┼────────────┼──────────┼───────┤
│ Europa │ Polska │ Warszawa │ 100 │
│ │ │ Kraków │ 80 │
│ │ Niemcy │ Berlin │ 120 │
│ Azja │ Japonia │ Tokio │ 200 │
└──────────────┴────────────┴──────────┴───────┘
```
System skanuje **w lewo** od każdej komórki z danymi, zbierając wszystkie nagłówki wierszy po drodze. Dla wiersza Warszawa: `Row: Europa > Polska > Warszawa`.
**Pionowy** — szerszy nagłówek grupy na **osobnym wierszu powyżej** wierszy szczegółowych (częste w raportach finansowych / eksportach z SAP). Wiersz grupy często zawiera wartości agregacji:
```
Q1 Q2
┌────────┬────────┐
Przychody │ 50000 │ 60000 │ ← Shift+R (R poz. 2), dane = A
├────────────┼────────┼────────┤
│ Produkty │ 30000 │ 35000 │ ← R (R poz. 1), dane = V
│ Usługi │ 20000 │ 25000 │ ← R (R poz. 1), dane = V
└────────────┴────────┴────────┘
```
System skanuje w lewo, **a następnie w górę**, znajdując szersze nagłówki grup ponad wierszem z danymi. Dla Produktów: `Row: Przychody > Produkty`. Patrz „Pionowe nagłówki wierszy" w sekcji Częste błędy po pełny workflow labelowania.
Zasady:
- **L1** = najbardziej szczegółowy (najbliższy danych). Kolumna najbliższa danych lub nagłówek wiersza szczegółowego.
- **L2, L3, ...** = szersze grupowania. Kolumna bardziej na lewo lub wiersz grupujący powyżej.
- Naciśnij **R**, aby oznaczyć na aktywnym poziomie. Naciśnij **Shift+R**, aby oznaczyć jeden poziom wyżej niż aktywny (szybki skrót dla nagłówków grup — bez przełączania poziomu).
- Scalona komórka nagłówka obejmująca wiele wierszy — oznacz raz, obejmie wszystkie wiersze.
- Jeśli nagłówek jest pusty, bo wartość powyżej domyślnie się powtarza (np. „Europa" obejmuje Polskę i Niemcy) — oznacz *widoczną* komórkę, nie puste. System radzi sobie z tym przez skanowanie.
### `col_header` (C / Shift+C) — Nagłówek kolumny
Komórka-etykieta na górze tabeli, nazywająca kolumnę lub grupę kolumn.
Wielopoziomowe nagłówki kolumn są ułożone w **osobnych wierszach**, z najszerszą kategorią na górze (najwyższy numer poziomu):
```
┌────────────────────────────────┐
│ Przychody 2024 │ ← C poz. 3 (scalona)
├───────────┬────────────────────┤
│ Q1 │ Q2 │ ← C poz. 2
├─────┬─────┼──────┬────────────┤
│ Sty │ Lut │ Mar │ Kwi │ ← C poz. 1
├─────┼─────┼──────┼────────────┤
│ 100 │ 120 │ 130 │ 140 │ ← wartości
└─────┴─────┴──────┴────────────┘
```
System znajduje nagłówki kolumn skanując **w górę**. Dla kolumny Sty chunk będzie: `Column: Przychody 2024 > Q1 > Sty`.
Zasady:
- **L1** = najniższy wiersz nagłówków (najbliższy danych). **L2, L3, ...** = wiersze wyżej (szersze).
- Naciśnij **C**, aby oznaczyć na aktywnym poziomie. Naciśnij **Shift+C**, aby oznaczyć jeden poziom wyżej.
- Scalona komórka nagłówka obejmująca wiele kolumn — oznacz raz.
### `aggregation` (A) — Agregacja
Komórka, której wartość jest obliczana z innych komórek — zwykle SUMA, ŚREDNIA, ILE.NIEPUSTYCH lub dowolna formuła. Używaj dla wierszy sumarycznych, sum częściowych, obliczonych procentów i każdej komórki, która czerpie wartość z innych danych.
Przykłady: wiersz „Razem" na dole tabeli, kolumna „Suma ogółem", średnia ważona, procent obliczony z dwóch innych komórek.
System automatycznie odczytuje formułę z pliku Excel. Wystarczy, że oznaczysz komórkę jako `aggregation`; tekst formuły, rozwiązane referencje i typ agregacji są wyodrębniane automatycznie.
**Nie** oznaczaj komórek agregacji jako `value`. Mimo że zawierają liczby, są pochodne, nie obserwowane. Rozróżnienie ma znaczenie dla chunków (chunki agregacji zawierają kontekst formuły) i dla treningu (GNN uczy się różnicy).
**Agregacja a wielopoziomowe nagłówki wierszy:** Jeśli widzisz wiersze „Wynagrodzenia", „Świadczenia", „Czynsz", a pod nimi pogrubiony wiersz „Razem" z formułą SUMA — „Razem" to `aggregation`. Pozycje powyżej to `value`. Tekst „Razem" w skrajnej lewej kolumnie to `row_header` dla wiersza agregacji. Nie rób z „Wynagrodzeń" pod-poziomu „Razem" — to niezależne nagłówki na tym samym poziomie, a formuła wychwytuje ich relację.
### `metadata` (M) — Metadane
Przypisy dolne, noty źródłowe, zastrzeżenia, znaczniki dat, informacje o autorze lub wersji — kontekst **poza** siatką danych, **bez** tytułów tabel i nagłówków sekcji (te są **`header`**, **H**).
Przykłady: „Stan na 2024-03-15", „Źródło: Ministerstwo Finansów", „* Dane skorygowane", ogólne zastrzeżenie na arkusz.
**Metadane arkusza vs. metadane tabeli:** Rozróżnienie opiera się na ID tabeli, nie na etykiecie.
- **T0 + metadata** = noty na poziomie całego arkusza (np. zastrzeżenie lub data obowiązująca dla wszystkich tabel).
- **T1 + metadata** (lub T2, T3...) = noty przypisane wyłącznie do danej tabeli (np. przypis dotyczący tylko tej tabeli).
Oba typy trafiają do chunków: metadane arkusza pojawiają się w każdym chunku, metadane tabeli tylko w chunkach z danej tabeli.
### `comment` (N) — Komentarz / przypis w komórce
Komórka zawierająca adnotację, przypis lub notatkę, która **odnosi się do innej komórki**, ale została wpisana w sąsiednią komórkę zamiast użycia wbudowanej funkcji komentarzy w Excelu. Autorzy arkuszy często umieszczają przypisy typu `*dane szacunkowe`, `patrz załącznik`, `skorygowano Q3` w komórkach obok danych, których dotyczą.
Przykłady: `*dane szacunkowe`, `patrz nota 3`, `skorygowane`, `Źródło: raport wewnętrzny`.
**Jak to działa:**
1. Zaznacz komórkę zawierającą tekst komentarza.
2. Naciśnij **N** — komórka zmienia kolor na żółty z przerywaną ramką.
3. Pojawia się banner na dole: *„Kliknij komórkę, do której odnosi się ten komentarz"*.
4. Kliknij komórkę docelową, którą komentarz opisuje (często komórkę value).
5. Pojawia się **przerywana pomarańczowa strzałka** łącząca komentarz z celem.
6. Naciśnij **Esc**, aby anulować linkowanie bez usuwania etykiety.
**Co dzieje się w chunkach:** Tekst komentarza jest wstawiany do chunka komórki docelowej z prefiksem `Note:`. Dzięki temu LLM widzi adnotację w kontekście, a przynależność jest jednoznaczna:
```
Column: Przychody > Q1
Row: Polska
Value: 1500000
Note: *dane szacunkowe, do potwierdzenia audytem
```
**Komentarz vs. header vs. metadane:** Używaj `header` dla tytułów tabel i nagłówków sekcji. Używaj `metadata` dla przypisów, linii źródła, zastrzeżeń i dat obowiązujących dla arkusza — nie dla tytułów. Używaj `comment` dla adnotacji odnoszących się do *konkretnej komórki* — przypisów, korekt, uwag wpisanych obok danych.
**Wbudowane komentarze Excela:** Jeśli komórka ma wbudowany komentarz Excela (pomarańczowy trójkąt w prawym górnym rogu), jest on wyodrębniany automatycznie — nie wymaga labelowania. Etykieta `comment` jest przeznaczona wyłącznie dla tekstu, który ktoś wpisał w *zwykłą komórkę* jako notatkę.
### `empty` (E) — Pusta
Komórka celowo pusta ze względów układu — wiersz-odstęp, pusta kolumna między tabelami, komórka-wypełniacz. Nie trzeba oznaczać każdej pustej komórki; stosuj tylko gdy pusta przestrzeń jest strukturalnie istotna (np. oddziela dwie tabele).
Niezaetykietowane niepuste komórki zostają zapisane jako `unlabeled`.
### `junk` (J) — Śmieć
Komórka zawierająca bezużyteczną lub błędną treść, która powinna być **odrzucona** przy budowaniu chunków. Chodzi o komórki, które w oczywisty sposób znalazły się w arkuszu przez pomyłkę lub nie niosą żadnej znaczącej informacji.
Przykłady:
- Automatycznie generowane nazwy kolumn: `Unnamed: 0`, `Unnamed 1`, `Column1`, `Field1`
- Uszkodzony lub zniekształcony tekst
- Dane testowe/debugowe pozostawione przez pomyłkę
- Zduplikowane artefakty
Komórki junk są **całkowicie ignorowane** podczas ekstrakcji chunków — nie generują chunków, nie są używane jako nagłówki i nie pojawiają się w żadnym wyniku. GNN również uczy się je rozpoznawać, aby mógł je automatycznie filtrować w predykcji.
**Junk vs. empty:** Używaj `empty` dla celowo pustych komórek-separatorów. Używaj `junk` dla komórek, które *mają treść*, ale ta treść jest bezsensowna lub błędna.
**Junk vs. unlabeled:** Jeśli pominiesz komórkę (nie nadasz etykiety), zostanie zapisana jako `unlabeled` — co oznacza, że nie podjąłeś decyzji. `junk` to wyraźna decyzja, że zawartość jest bezwartościowa i powinna zostać odrzucona.
---
## Obsługa wielu tabel na jednym arkuszu
Wiele arkuszy zawiera kilka tabel oddzielonych pustymi wierszami/kolumnami lub tytułami. **Musisz** przypisać każdej tabeli inny ID.
### Krok po kroku
1. Przejrzyj arkusz i zidentyfikuj oddzielne siatki danych. Każda siatka z własnymi nagłówkami to osobna tabela.
2. Znajdź treści na poziomie arkusza (ogólny tytuł, data, przypisy). To idzie na **T0**.
3. Przełącz na **T1** i oznacz wszystkie komórki pierwszej tabeli (nagłówki, wartości, agregacje).
4. Przełącz na **T2** i oznacz wszystkie komórki drugiej tabeli.
5. Powtórz dla kolejnych tabel. Kliknij **[+]**, aby dodać T3, T4 itd.
### Dlaczego to ważne
- GNN buduje **osobny podgraf** na tabelę. Komórki z różnych tabel nie są ze sobą połączone — błędne przypisania psują strukturę grafu.
- Generator chunków tworzy chunki tylko dla komórek z T1+. Komórki T0 z etykietami `header` i `metadata` są dołączane do chunków wszystkich tabel. Jeśli przypadkowo umieścisz komórkę value w T0, nie wygeneruje ona żadnego chunku.
- Skanowanie nagłówków zatrzymuje się na granicach tabel. Jeśli dwie tabele sąsiadują ze sobą i przypisujesz im ten sam ID, nagłówki z jednej tabeli przenikną do chunków drugiej.
### Przykład
```
Wiersz 1: „Podsumowanie finansowe 2024" ← H (T0: tytuł arkusza)
Wiersz 2: (pusty)
Wiersz 3: „Rachunek zysków i strat" ← H (T1: tytuł tabeli)
Wiersz 4: „Kategoria" | „Q1" | „Q2" | „Q3" ← R1 + C1 C1 C1 (T1)
Wiersz 5: „Przychody" | 500 | 600 | 700 ← R1 + V V V (T1)
Wiersz 6: „Koszty" | 300 | 350 | 400 ← R1 + V V V (T1)
Wiersz 7: „Zysk" | 200 | 250 | 300 ← R1 + A A A (T1, formuły)
Wiersz 8: (pusty)
Wiersz 9: „Bilans" ← H (T2: tytuł tabeli)
Wiersz 10: „Pozycja" | „Kwota" ← R1 + C1 (T2)
Wiersz 11: „Aktywa" | 5000 ← R1 + V (T2)
Wiersz 12: „Zobowiąz." | 3000 ← R1 + V (T2)
```
---
## Niestandardowe układy nagłówków
Większość arkuszy ma nagłówki kolumn **nad** danymi i nagłówki wierszy **po lewej**. System obsługuje też tabele, w których ta konwencja jest odwrócona:
- **Nagłówki pod danymi** — nagłówki kolumn znajdują się pod wartościami zamiast nad nimi.
- **Nagłówki po prawej stronie danych** — nagłówki wierszy pojawiają się po prawej stronie wartości zamiast po lewej.
**Jak to działa:** System automatycznie wykrywa orientację nagłówków dla każdej tabeli, porównując pozycje komórek nagłówkowych z komórkami danych. Labelujesz nagłówki dokładnie tak samo (`C` dla nagłówków kolumn, `R` dla nagłówków wierszy), niezależnie od tego, gdzie się znajdują — system sam ustali kierunek.
**Ważne:** Jeśli tabela ma nagłówki zarówno nad *jak i* pod danymi (np. nagłówki w środku regionu danych), podziel ją na dwie osobne tabele (T1, T2). System wyznacza jedną orientację na tabelę, więc mieszanie kierunków w jednej tabeli da nierzetelne wyniki.
### Przykład: nagłówki po prawej
```
┌───────┬───────┬────────────┐
│ 100 │ 200 │ Przychody │ ← R poz. 1 (po prawej)
│ 50 │ 80 │ Koszty │ ← R poz. 1
│ 50 │ 120 │ Zysk │ ← R poz. 1
├───────┼───────┼────────────┤
│ Q1 │ Q2 │ │ ← C poz. 1 (pod danymi)
└───────┴───────┴────────────┘
```
Labeluj komórki tak samo jak zawsze: `Przychody`, `Koszty`, `Zysk` → **R1**; `Q1`, `Q2` → **C1**; komórki liczbowe → **V**. System wykryje, że nagłówki kolumn są poniżej, a nagłówki wierszy po prawej, i wygeneruje poprawne chunki jak `Column: Q1 > Row: Przychody > Value: 100`.
---
## Najczęstsze błędy
### 1. Zapomnienie o przełączeniu tabeli
Jeśli oznaczysz pierwszą tabelę na T1, a potem zapomnisz przełączyć na T2 dla drugiej, wszystkie komórki trafią do jednej ogromnej tabeli. Nagłówki z tabeli 1 zanieczyszczą chunki tabeli 2.
**Rozwiązanie:** Zawsze sprawdzaj pasek Table przed labelowaniem nowego regionu.
### 2. Oznaczanie agregacji jako value
Komórka z `=SUMA(...)` lub `=ŚREDNIA(...)` powinna być `aggregation`, nie `value`. System wyodrębnia kontekst formuły dla komórek agregacji, ale nie dla value. Jeśli oznaczysz sumę jako value, chunk straci informację o formule.
### 3. Błędny poziom nagłówka
Jeśli arkusz ma dwa poziomy nagłówków kolumn (np. „2024" obejmujące Q1-Q4, poniżej „Q1", „Q2", „Q3", „Q4"), dolny wiersz to **poziom 1** (najbardziej szczegółowy), a górny to **poziom 2** (szerszy). Odwrócenie odwraca hierarchię w chunkach.
**Zasada:** najbardziej szczegółowy = poziom 1, szersze grupowania = wyższy numer.
### 4. Mylenie poziomów nagłówków z agregacją
Wielopoziomowe nagłówki wierszy to **osobne kolumny** lub **osobne wiersze** (patrz pionowe nagłówki wierszy poniżej). Jeśli widzisz wiersze ułożone pionowo w *tej samej* kolumnie — np. „Wynagrodzenia", „Świadczenia", potem „Razem" — to *nie* są poziomy nagłówków. „Wynagrodzenia" i „Świadczenia" to nagłówki wierszy (poziom 1), a „Razem" to nagłówek wiersza agregacji. Hierarchia między nimi jest wychwytywana przez formułę, nie przez poziomy.
### Pionowe nagłówki wierszy (wiersze grupujące nad danymi)
Częsty wzorzec (szczególnie w raportach finansowych i eksportach z SAP): **nagłówek grupy na osobnym wierszu** nad wierszami szczegółowymi. Wiersz grupy często zawiera **wartości agregacji** (sumy/podsumowania dla wierszy poniżej):
```
Q1 Q2
┌────────┬────────┐
Przychody │ 50000 │ 60000 │ ← Shift+R (R poz. 2), dane = A (agregacja)
├────────────┼────────┼────────┤
│ Produkty │ 30000 │ 35000 │ ← R (R poz. 1), dane = V (value)
│ Usługi │ 20000 │ 25000 │ ← R (R poz. 1), dane = V (value)
├────────────┼────────┼────────┤
Koszty │ 40000 │ 45000 │ ← Shift+R (R poz. 2), dane = A (agregacja)
├────────────┼────────┼────────┤
│ Pensje │ 25000 │ 28000 │ ← R (R poz. 1), dane = V (value)
│ Czynsz │ 15000 │ 17000 │ ← R (R poz. 1), dane = V (value)
└────────────┴────────┴────────┘
```
Wynikowe chunki:
- `Row: Przychody > Produkty`, Column: Q1, Value: 30000
- `Row: Przychody`, Column: Q1, AGGREGATION: 50000
- `Row: Koszty > Pensje`, Column: Q1, Value: 25000
- itd.
**Jak oznaczać (workflow):**
1. Najpierw oznacz **nagłówki wierszy szczegółowych**: zaznacz komórki „Produkty", „Usługi", „Pensje", „Czynsz" i naciśnij **R** (przypisze R poz. 1 na domyślnym aktywnym poziomie).
2. Oznacz **nagłówki grup**: zaznacz „Przychody" i „Koszty" i naciśnij **Shift+R** (przypisze R poz. 2, jeden poziom wyżej — bez przełączania poziomu).
3. Oznacz **komórki z danymi**: wartości szczegółowe → **V**, sumy grupowe → **A** (agregacja, nawet bez formuł — np. w arkuszach z SAP sumy mogą być statycznymi wartościami).
4. Oznacz **nagłówki kolumn** („Q1", „Q2") → **C**.
System zajmie się resztą: po skanowaniu w lewo na wierszu z danymi, skanuje **w górę**, aby znaleźć szersze nagłówki (wyższe numery poziomów). Komórki agregacji w wierszu grupy są pomijane, nie traktowane jako granice.
**Jeśli wzorzec ma trzy poziomy** (np. Firma > Przychody > Produkty):
```
Firma Ogółem │ 100000 │ ← Shift+R 2× lub L3+R (R poz. 3), dane = A
├─────────────┼────────┤
│ Przychody │ 50000 │ ← Shift+R (R poz. 2), dane = A
│ ├───────────┼────────┤
│ │ Produkty │ 30000 │ ← R (R poz. 1), dane = V
│ │ Usługi │ 20000 │ ← R (R poz. 1), dane = V
├─────────────┼────────┤
│ Koszty │ 40000 │ ← Shift+R (R poz. 2), dane = A
│ ├───────────┼────────┤
│ │ Pensje │ 25000 │ ← R (R poz. 1), dane = V
│ │ Czynsz │ 15000 │ ← R (R poz. 1), dane = V
└─────────────┴────────┘
```
Dla 3+ poziomów ustaw aktywny poziom na L2, a Shift+R da L3. Lub użyj **L** → **3** → **R** bezpośrednio.
Zasady:
- Nagłówek grupy dostaje **wyższy numer poziomu** niż nagłówki szczegółowe poniżej (np. L2 dla grupy, L1 dla szczegółów).
- **Shift+R** to najszybszy sposób: przypisuje jeden poziom wyżej niż aktywny, bez przełączania.
- Nagłówek grupy może być w tej samej kolumnie lub w kolumnie na lewo od nagłówków szczegółowych.
- Komórki z danymi w wierszu grupy powinny mieć etykietę **A** (agregacja), nawet bez formuł. Wiersz grupy to podsumowanie, a system nada mu właściwy kontekst nagłówka.
- Puste wiersze między nagłówkiem grupy a szczegółami są w porządku — skanowanie je pomija.
- Wzorzec może się zagnieżdżać: grupa L3 nad grupami L2 nad szczegółami L1.
### 5. Umieszczanie danych w T0
T0 jest dla tytułów i nagłówków sekcji na poziomie arkusza (`header`), przypisów i innych not (`metadata`) — nie dla danych wewnątrz tabeli. Komórki `value`, `row_header`, `col_header` lub `aggregation` umieszczone w T0 **nie** wygenerują chunku i nie będą połączone z żadnym grafem tabeli.
### 6. Brak oznaczania pustych wierszy-separatorów
Jeśli puste wiersze lub kolumny oddzielają dwie tabele, oznacz je jako `empty` (dowolny ID tabeli). Pomaga to modelowi nauczyć się granic strukturalnych.
### 7. Oznaczanie przypisów jako metadata zamiast comment
Jeśli widzisz komórkę typu `*skorygowane` lub `patrz nota 3` obok komórki z danymi, **nie** oznaczaj jej jako `metadata`. Tytuły oznaczaj jako `header`, ogólne przypisy i noty źródłowe jako `metadata`; przypisy odnoszące się do **konkretnej** komórki z danymi powinny mieć etykietę `comment` i być zlinkowane z komórką docelową. Dzięki temu notatka trafi do właściwego chunka, a nie do każdego chunka na arkuszu.
### 8. Zapomnienie o zlinkowaniu komentarza z celem
Jeśli oznaczysz komórkę jako `comment`, ale nie klikniesz komórki docelowej, tekst komentarza nie zostanie dołączony do żadnego chunka. Zawsze dokończ linkowanie — banner na dole przypomina o tym kroku.
---
## Kontrola przed zapisem
Przed naciśnięciem Enter szybko sprawdź:
- [ ] Każda komórka z danymi ma etykietę (value lub aggregation).
- [ ] Każda komórka nagłówka ma prawidłową etykietę i poziom.
- [ ] Tabele mają różne ID tabel (sprawdź kolorowe kropki na komórkach).
- [ ] Tytuły arkusza to `header` na T0; tytuły tabel to `header` na ID danej tabeli; przypisy i noty — `metadata` tam, gdzie pasuje.
- [ ] Komórki agregacji (pogrubione sumy, komórki z formułami) są oznaczone A, nie V.
- [ ] Hierarchia nagłówków ma sens: poziom 1 to najbardziej szczegółowy, wyższe poziomy to szersze grupowania.
- [ ] Przypisy/adnotacje w komórkach są oznaczone jako `comment` (N), nie `metadata`, i zlinkowane z komórką docelową (widoczna pomarańczowa strzałka).
---
## Podsumowanie skrótów klawiszowych
| Skrót | Akcja |
|-------|-------|
| **V** | Oznacz jako value (wartość) |
| **H** | Oznacz jako header (tytuł tabeli / nagłówek sekcji) |
| **R** | Oznacz jako row_header (nagłówek wiersza, na aktywnym poziomie) |
| **Shift+R** | Oznacz jako row_header jeden poziom wyżej niż aktywny (skrót dla nagłówka grupy) |
| **C** | Oznacz jako col_header (nagłówek kolumny, na aktywnym poziomie) |
| **Shift+C** | Oznacz jako col_header jeden poziom wyżej niż aktywny |
| **A** | Oznacz jako aggregation (agregacja) |
| **M** | Oznacz jako metadata (metadane) |
| **N** | Oznacz jako comment (komentarz, potem kliknij komórkę docelową) |
| **E** | Oznacz jako empty (pusta) |
| **J** | Oznacz jako junk (śmieć, odrzucone z chunków) |
| **X** | Wyczyść etykietę |
| **T** potem cyfry | Ustaw aktywną tabelę (np. T, 1, 2 dla T12) |
| **L** potem cyfry | Ustaw aktywny poziom nagłówka (np. L, 5 dla L5) |
| **Esc** | Anuluj linkowanie komentarza |
| **Enter** | Zapisz i wczytaj następny arkusz |
| **Shift+klik** | Zaznaczanie zakresu |
| **Ctrl/Cmd+klik** | Przełączanie zaznaczenia |