Skip to content

Ollama yield is ~1 card per section: cards_per_concept is ignored and there is no retry on zero #14

Description

@tonserrobo

Evidence (UE5 C++ Setup run, 2026-07-03)

CLI advertises target: 3 per concept, but the run produced 6 cards from 14 sections (13,432 chars). Nearly every section logs Generated 1 cards or Generated 0 cards; 8/14 sections ended uncovered. The other three runs show the same ~1 card/section ceiling.

Root causes

  1. cards_per_concept is threaded through generate_flashcards() but _build_ollama_prompt() never receives it — the prompt just says "Generate 1 to 6 cards" and gemma-class models reliably return exactly 1.
  2. Sections are size-capped at 1200 chars and _CHUNK_MAX_CHARS is also 1200, so every section is a single chunk = a single model call = at most ~1 card.
  3. When the quality gate or validation drops that one card, the section nets 0 and there is no second attempt — it goes straight to "uncovered".

Fix ideas

  • Pass cards_per_concept into the Ollama prompt ("generate ~N cards, one per distinct fact").
  • On a 0-card outcome for a non-trivial section, retry once (optionally with a nudge like "the previous attempt produced nothing usable").

Related: #1 (card quality), and the checkpoint issue that freezes these zero results.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions