feat(knowledge): LIST answer path — full table ingestion, typed list payloads

Part 1 of the lists design (DESIGN.md §11): mechanical full ingestion, separated from epistemic answer-completeness. parse_tables rewritten as a GRID parser: cells accumulate until |- (both layouts), empty cells kept as placeholders (image cells clean to ''; dropping them shifted France rows to start at 'FRA'), rowspan/colspan expanded at placement, total_rows is the computed extent — no truncation. _clean_cell: refs/sup/File links dropped, citation templates (cref2/efn...) resolve empty, links take display text, attrs split first. LIST path in expert.py: deterministic enumeration detection OR planner-declared LIST; SELECT TABLE (one LLM call over table metadata, never rows); ingest ALL rows as member_of edges (quote = full row line, containment against stored table text); aggregate via len() — no LLM. AnswerType.LIST added; evidence payloads carry list_items + coverage. Verified live cold: 50 sovereign states from the Europe article table (51 rows - Total footer), every member with verbatim quote. 19/19 tests.
This commit is contained in:
2026-10-18 16:53:10 +02:00
parent a78f65de2c
commit 6fcb3c0a86
9 changed files with 480 additions and 40 deletions
+1
View File
@@ -19,6 +19,7 @@ class AnswerType(str, Enum):
FUNCTION = "FUNCTION"
INTERVAL = "INTERVAL"
CONSTANT = "CONSTANT"
LIST = "LIST"
class BudgetExhausted(Exception):