Skip to content

improve: expand compare_and_contrast and create_flash_cards; apply cognitive science to flashcards#2126

Open
OdinKral wants to merge 3 commits into
danielmiessler:mainfrom
AnsibleBBridge:improve/thin-stubs
Open

improve: expand compare_and_contrast and create_flash_cards; apply cognitive science to flashcards#2126
OdinKral wants to merge 3 commits into
danielmiessler:mainfrom
AnsibleBBridge:improve/thin-stubs

Conversation

@OdinKral
Copy link
Copy Markdown

@OdinKral OdinKral commented May 16, 2026

Summary

Two stub patterns expanded with real structure. create_flash_cards additionally updated with cognitive science principles from active recall research.

compare_and_contrast

Before: "Please be brief. Compare and contrast the list of items." with no dimension-selection guidance.

After: Steps for picking meaningful dimensions (not trivial similarities), cell-length guidance, and a Key Takeaways section to surface non-obvious patterns.

create_flash_cards

Before: 4 bullets, no card count, no format spec.

After (initial): Numbered steps, card count target, Q:/A: format.

After (cognitive science pass): Added principles from active recall research:

  • Retrieval vs recognition: Questions must force the learner to generate the answer, not pattern-match the phrasing. Wrong/right example included in the pattern itself.
  • One idea per card: Explicitly enforced — compound questions get split.
  • Concrete anchors: Abstract answers must end with a concrete example (e.g. ...).
  • Three question types: Definition, Mechanism/Why-How, Application/When — all used where the material supports it.
  • Synthesis cards: 2–4 per deck connecting concepts into chunks, building usable mental models.
  • Card ordering: Definition → Mechanism → Application → Synthesis mirrors how understanding builds.

raw_query was also flagged by the audit script but intentionally left as-is — it's a minimal pass-through by design.

Test plan

  • fabric -p compare_and_contrast "Python vs JavaScript vs Go" returns a table with meaningful dimensions and a Key Takeaways section
  • fabric -p create_flash_cards on a short article returns Q:/A: cards across all three question types, with concrete examples on abstract answers, and 2–4 synthesis cards at the end

🤖 Generated with Claude Code

OdinKral and others added 3 commits May 16, 2026 12:12
93 patterns had no standardized # INPUT section, making the input
boundary ambiguous. Three variants existed:

  - 7 patterns used ## INPUT (wrong heading level) → upgraded to # INPUT
  - 8 patterns had bare "INPUT:" text with no heading → added # INPUT header
  - 78 patterns had no input section at all → appended # INPUT + INPUT:

All changes are structural only — no content was altered. The
# INPUT section is the standard marker used by Fabric's CLI and
pattern tooling to delimit where user input is injected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
compare_and_contrast (14 lines → 20): was "Please be brief. Compare and
contrast the list of items." with no guidance on how to pick dimensions or
what makes a useful comparison. Expanded with dimension-selection step,
cell-length guidance, and a Key Takeaways section after the table.

create_flash_cards (14 lines → 22): had no guidance on card count, no
format spec beyond "Markdown", and an unnecessary output section. Expanded
with numbered steps, card count target, Q:/A: format with length constraints,
and a reminder to test understanding over trivia.

raw_query intentionally left as-is — it's a minimal pass-through pattern
by design.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Expands the pattern with learning principles from active recall and
chunking research (Barbara Oakley, "A Mind for Numbers"):

- Retrieval vs recognition: questions must force generation, not
  pattern-matching. Includes a wrong/right example in the pattern.
- One idea per card: explicitly enforced — compound questions split.
- Concrete anchors: abstract answers must end with a concrete example.
- Three question types: Definition, Mechanism/Why-How, Application/When
  — all three used where the material supports it.
- Synthesis cards: 2–4 cards per deck connecting concepts into chunks.

Output format updated: Q:/A: labels (cleaner than **Q:**/**A:**),
40-word answer limit (up from 32 to accommodate examples), and a
loose card ordering (Definition → Mechanism → Application → Synthesis)
that mirrors how understanding builds.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@OdinKral OdinKral changed the title improve: expand compare_and_contrast and create_flash_cards stubs improve: expand compare_and_contrast and create_flash_cards; apply cognitive science to flashcards May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant