Flashcard Mode
Flashcard mode provides a drill-and-practice interface for memorizing terms and definitions.
Agents
FlashcardTeachingAgent
inherits from TopicTeachingAgent.
generate_teaching_material(topic, count=50, user_background=None)
Generates a set of flashcards.
- Batch Generation: If the LLM generates fewer cards than requested, the agent enters a retry loop (
while len(cards) < count) to fetch additional unique terms. - Deduplication: Maintains a
seen_termsset to prevent duplicates during retries. - Output: List of dictionaries
{'term': ..., 'definition': ...}.
get_flashcard_count_for_topic(topic, user_background)
Estimates the number of flashcards appropriate for the topic (clamped between 10 and 50).