#547·storm

Handle empty retrieval tables during article generation

Author: pxm-0Created Jul 20, 2026Updated Jul 24, 2026

Context

Article generation crashes when research produces no snippets because cosine similarity receives an empty 1D array.

Acceptance criteria

  • Article generation does not call cosine similarity with an empty snippet matrix.
  • Empty retrieval returns no information and preserves normal behavior for populated tables.
  • A focused runnable regression check covers the empty-table path.

Out of scope

  • Replacing the DuckDuckGo package.
  • Changing Wikipedia parsing behavior.