Telegram bot for technical interview preparation using flashcards and smart prioritized spaced repetition.
## Overview
**pievr** is a personal Telegram bot designed to streamline technical interview preparation. Instead of standard rigid calendar intervals (like traditional spaced repetition apps), it uses a dynamic priority queue system based on recent performance and time elapsed.
- **Priority Calculation:** Priorities are calculated dynamically in Go code based on:
- Time elapsed since the question was last asked (older unseen/unasked questions rise in priority).
- Success streak (`streak`): successful answers decrease priority, while mistakes increase it sharply.
- **New Questions Mix:** Unseen questions (`times_asked = 0`) have no priority and are smoothly mixed into study sessions in a configurable proportion alongside prioritized review questions.
### 2. Flexible Tagging
- Questions support multiple tags (many-to-many relationship) to allow granular topic filtering and cross-cutting selections (e.g., combining `go` and `concurrency`).
### 3. LLM Integration (Gemini API)
- **Configurable BaseURL:** Configurable via environment or config file to support proxies or custom endpoints.
- **Background Generation:** Background workers passively generate questions in bulk (e.g., in JSON batches) to maintain a target buffer of questions.
- **Self-Validation:** When questions are generated, the LLM validates them by answering its own questions before they enter the active pool.
- **Bot Interaction:** The bot can operate as an AI assistant with tool-use capabilities to query the database, manage tags, and fetch questions.
### 4. Database Schema (SQLite)
Stored locally in `storage/` (excluded via `.gitignore`):