Smart Question Tutor

approved

by XXJ

读取本地md知识库,调用Ollama/OpenAI兼容API自动生成试题,支持导出MD、Word、PDF,AI识别试卷、错题本、间隔复习 - This plugin has not been manually reviewed by Obsidian staff.

6 stars181 downloadsUpdated 10d ago0BSD

Smart Question Tutor — 智学助手

AI-powered, spaced-repetition study plugin for Obsidian

Obsidian Release TypeScript AI

English | 中文


English

What is it?

Smart Question Tutor turns your Obsidian Markdown notes into an active-study machine. It reads your local knowledge base, uses AI (local Ollama or any OpenAI-compatible API) to generate quiz questions, records wrong answers into a spaced-repetition review loop, builds a knowledge-tag graph, and lets you export to Markdown / Word / PDF.

Features

AI Question Generation

  • Generate quizzes from any Markdown note with 5 question types: single choice, multiple choice, true/false, fill-in-the-blank, short answer.
  • Supports Ollama (local, private) and OpenAI-compatible endpoints (DeepSeek, etc.) via custom base URL, model, API key and temperature.
  • AI auto-extracts knowledge tags and writes [[wikilinks]] so everything appears in your Obsidian graph view.
  • Customize per-type counts, run in batch over multiple files, and sort results by source / tag / date.

Full Exam Recognition

  • Extract every question from a complete exam paper or question bank via AI, preserving original question types and formatting.
  • Large files are chunked (15,000 chars per chunk, 2,000 overlap) to avoid truncation.
  • Existing answers are kept as-is; missing answers are auto-generated by the AI.
  • Handles Markdown, txt, RTF, docx, PDF and images.

Answering Mode

  • Start answering any generated result or saved question file in one click.
  • Instant grading with the correct answer and explanation.
  • Objective questions are auto-scored; subjective questions can be manually marked correct/wrong — missed ones go straight to the wrong-answer book.

Wrong Answer Book (SM-2 spaced repetition)

  • Answer correctly → interval advances; answer wrong → resets to day 1.
  • Three interval presets per module — Slow / Standard / Fast — with Chinese hints for each phase of exam prep.
  • Wrong answers carry [[knowledge tags]] and sync into the knowledge folder for the graph.
  • Automatic review reminders when the plugin loads.

Study Notes

  • Generate condensed study notes from any Markdown file, any existing question/wrong-answer/note.
  • Notes participate in the same spaced-repetition review schedule.
  • Search, filter and export.

Review Dashboard

  • One unified list of every due review item (wrong answers + questions + notes), filterable and sortable by source / tag / date.
  • One-click Done per item advances it to the next review cycle.

Learning Heatmap

  • GitHub-style annual contribution graph on the Home tab.
  • Horizontal scrollbar, auto-positioned to today; follows the sidebar width, always staying pinned to the current day.
  • Color intensity tiers by activity count.

Knowledge Graph

  • A single knowledge-tag index folder; each tag gets an auto-generated MOC note with 相关题目 / 相关笔记 / 相关错题 sections.
  • Rebuild the index on demand: it scans every folder's tags, recreates all index notes, and cleans up stale ones in one pass.
  • Handwritten notes in the knowledge folder are never touched.

Export

  • Export to Markdown, Word (.docx) or PDF.
  • Answer-free exports are available for self-testing.

🌐 Bilingual UI (Chinese / English)

  • One-click interface language switch in Settings — the whole UI flips between 中文 and English instantly.
  • The switch is also available right inside the sidebar settings; command palette names update after a plugin restart.
  • AI prompts are bilingual too while keeping the "language follows the material" rule: Chinese material still produces Chinese questions, English material produces English questions.
  • English parsing & export support (Answer:, Explanation:, Answer Summary, ...) — English-material exams parse and export correctly.
  • Missing translations fall back to the original Chinese text, so the UI never goes blank.

Repository

GitHub: https://github.com/xxinjie21/Smart-Quiz-Tutor


Installation

From Obsidian Community Plugins

  1. Open SettingsCommunity pluginsBrowse
  2. Search for Smart Question Tutor
  3. Click Install, then Enable

Manual Installation (GitHub Release)

Download the main.js, manifest.json and styles.css from the latest Release, then copy them into:

your-vault/.obsidian/plugins/smart-quiz-tutor/
├── main.js
├── manifest.json
└── styles.css

Then enable the plugin in SettingsCommunity pluginsInstalled plugins.


Quick Start

  1. Configure AI — open SettingsSmart Question Tutor; choose Ollama or OpenAI and set the API URL, model, and API key (if needed).
  2. Generate questions — click the ribbon icon to open the sidebar; in the 题目 tab pick a Markdown source file, choose question types & counts, click Generate.
  3. Start answering — click 开始答题 after generation finishes.
  4. Review mistakes — wrong answers are auto-saved with spaced-repetition scheduling; open the 错题 tab to review now.
  5. Track progress — check the 复习 tab for due items, or read the heatmap on 首页.

Commands

CommandAction
打开智学助手侧边栏Open the main sidebar
基于当前文档生成试题Open the generator for the active file
识别当前文件试卷Run full-exam recognition on the active file
查看错题本Open the wrong-answer list
查看题目生成历史记录Open generation history
重建知识点索引Rebuild all knowledge-index MOC notes

Hotkeys

HotkeyAction
Ctrl+QOpen the generator for the current document

Customizable in SettingsHotkeys.


Settings

Core

SettingDescriptionDefault
界面语言Interface language (中文 / English)中文
接口类型Ollama or OpenAI-compatibleOllama
接口地址API service URLhttp://127.0.0.1:11434
模型名称AI modelqwen2:7b
API KeyRequired only for hosted providers(empty)
TemperatureRandomness (0–2)0.1
根文件夹Parent folder for all modules智学助手
题目文件夹Generated-question folder题目
错题文件夹Wrong-answer folder错题
笔记文件夹Study-note folder笔记
知识点文件夹Knowledge-index folder知识点
排除文件夹Folders excluded from scanning.trash, 模板, templates

Review Interval Presets

ModuleSlowStandardFast
错题2,5,10,20,40,601,2,4,7,15,301,1,3,5,10,20
题目10,20,40,80,1207,15,30,60,904,8,18,40,60
笔记3,8,20,45,802,6,14,35,701,1,2,3,5

Interface

The sidebar has 6 tabs:

TabContent
🏠 首页Stats overview (4 cards) + learning heatmap + review reminders + quick actions
📝 题目Generation settings, question files, file picker
📋 笔记Create study notes from files, note management
❌ 错题Wrong-answer list, detail, review, export, regeneration
📊 复习Unified due-review dashboard with filter / sort / one-click completion
⚙️ 设置All configuration

Tech Stack

TechnologyPurpose
Obsidian APIPlugin platform
TypeScriptDevelopment
esbuildBundler
docxWord document generation
SM-2Spaced-repetition algorithm

Changelog

v2.1.0

  • One-click Chinese/English language switch — ~500 UI strings across all tabs now go through a zh/en dictionary; switch instantly from Settings (or the in-sidebar settings).
  • Bilingual AI prompts — question generation, exam extraction, note generation and tag suggestion support both languages, keeping the "language follows the material" rule.
  • English parsing & export support — the question parser and exporter now recognize Answer: / Explanation: / Answer Summary etc., so English-material questions parse and export correctly.
  • Dictionary fallback — missing translations show the original text, so the UI never goes blank.
  • Made the dynamic-script strip regex minifier-agnostic, keeping createElement("script") at 0 for the Obsidian review lint.
  • 153 tests pass (new: dictionary integrity, placeholder replacement, bilingual prompts, English parsing); tsc 0 errors, ESLint 0 errors.

v2.0.1

  • Removed the remaining dynamic <script> injection (from the setimmediate dependency) that Obsidian's review lint flagged as an error — createElement("script") went from 3 to 0, unblocking community review.

v2.0.0

  • Knowledge-index rebuild is now resilient — a single failed tag write no longer aborts the whole rebuild; stale index files are cleaned up in one pass.
  • Review progress persists across sessions — interval / correct-count are stored as numbers, so your spaced-repetition streak is no longer reset on reload.
  • Responsive heatmap — uses a scrollbar, auto-positions to today, and stays pinned to today as you resize the sidebar.
  • Added comprehensive test suites (knowledge index, document service, note service, fixes).

Support

If this plugin helps your studies, consider giving it a star on GitHub!

GitHub: https://github.com/xxinjie21/Smart-Quiz-Tutor

For issues and feature requests, please open an issue.


License

ISC License


中文文档

这是什么?

智学助手 把你的 Obsidian Markdown 笔记变成一台主动学习机:读取本地知识库,用 AI(本地 Ollama 或任意 OpenAI 兼容接口)生成试题,把错题纳入间隔重复的复习循环,构建知识点图谱,并可导出 Markdown / Word / PDF。

功能

🧠 AI 试题生成

  • 基于 Markdown 笔记原文,AI 自动出题,支持 5 种题型:单选 / 多选 / 判断 / 填空 / 简答。
  • 支持 Ollama(本地、离线、隐私)与 OpenAI 兼容接口(如 DeepSeek 等),可自定义接口地址、模型、API Key、Temperature。
  • AI 自动提取知识点标签并写入 [[双向链接]],融入 Obsidian 图谱视图
  • 每种题型可独立设置数量,支持多文件批量生成,结果可按源文件 / 知识点 / 时间排序。

📄 整卷识别

  • 从完整试卷 / 题集中 AI 提取全部题目,保留原题型与格式
  • 大文件自动分块处理(每块 15000 字符、重叠 2000 字符),避免内容截断。
  • 原卷已有答案原样保留,缺答案由 AI 自动补全。
  • 支持 Markdown、txt、RTF、docx、PDF 与图片。

✍️ 答题模式

  • 一键开始对刚生成的结果或已保存的题目文件答题。
  • 即时批改,展示正确答案与解析。
  • 客观题自动计分,主观题可手动标记正误;答错自动进入错题本。

📘 错题本(SM-2 间隔重复)

  • 答对 → 间隔递增;答错 → 重置为第 1 天。
  • 每个模块提供 慢速 / 标准 / 快速 三套间隔预设,并附各备考阶段的中文说明。
  • 错题携带 [[知识点标签]],自动同步到知识点文件夹,图谱可见。
  • 插件启动时自动提醒到期复习。

📓 学习笔记

  • 从任意 Markdown 文件,或已有题目 / 错题 / 笔记一键生成浓缩知识点笔记。
  • 笔记同样纳入间隔重复复习体系。
  • 支持搜索、筛选、导出。

📊 复习看板

  • 统一展示所有到期复习项(错题 + 题目 + 笔记),可按源文件 / 知识点 / 时间筛选排序。
  • 每项一键「已完成」,自动推进到下一复习周期。

📈 学习热力图

  • 首页 GitHub 风格年度活跃图。
  • 横向滑动条,自动定位到当天;随侧边栏宽度自适应,始终钉在当天
  • 颜色按活动频次分级。

🔗 知识点图谱

  • 统一的知识点索引文件夹;每个知识点自动生成 MOC 索引笔记,含 相关题目 / 相关笔记 / 相关错题 三个分区。
  • 支持一键重建知识点索引:扫描各文件夹标签、重建全部索引、并一次性清理过期索引。
  • 知识点文件夹中的手写笔记永远不会被误删。

📤 专业导出

  • 支持导出 MarkdownWord (.docx)PDF
  • 可导出无答案版用于自测。

🌐 中英文双语界面

  • 设置页一键切换界面语言,整个界面在 中文 / English 间即时切换。
  • 侧边栏设置内也可直接切换;命令面板中的命令名在重启插件后更新。
  • AI 提示词同样双语化,同时保留「语言与材料一致」规则:中文材料仍出中文题,英文材料出英文题。
  • 英文解析与导出兼容Answer:Explanation:Answer Summary 等)——英文材料的试卷可正常解析与导出。
  • 漏翻的文案自动回退显示中文原文,界面永不空白。

仓库地址

GitHub: https://github.com/xxinjie21/Smart-Quiz-Tutor


安装

从 Obsidian 社区插件安装

  1. 打开 设置社区插件浏览
  2. 搜索 Smart Question Tutor
  3. 点击 安装,然后 启用

手动安装(GitHub Release 下载)

从最新 Release 下载 main.jsmanifest.jsonstyles.css,放入:

your-vault/.obsidian/plugins/smart-quiz-tutor/
├── main.js
├── manifest.json
└── styles.css

然后在 设置社区插件已安装插件 中启用。


快速开始

  1. 配置 AI — 打开 设置Smart Question Tutor,选择 Ollama 或 OpenAI,设置接口地址、模型、API Key(如需要)。
  2. 生成题目 — 点击左侧栏图标打开侧边栏,在「题目」Tab 选择 Markdown 源文件,选择题型与数量,点击「生成」。
  3. 开始答题 — 生成完成后点击「开始答题」。
  4. 复习错题 — 错题自动按间隔重复计划保存;打开「错题」Tab 可立即复习。
  5. 跟踪进度 — 在「复习」Tab 查看待复习项,或在首页查看热力图。

命令

命令说明
打开智学助手侧边栏打开主界面侧边栏
基于当前文档生成试题基于当前活动文件打开出题器
识别当前文件试卷对当前文件执行整卷识别
查看错题本打开错题列表
查看题目生成历史记录打开生成历史
重建知识点索引重建所有知识点索引笔记

快捷键

快捷键功能
Ctrl+Q为当前文档打开出题器

可在 设置 → 快捷键 中自定义。


配置

核心设置

设置项说明默认值
界面语言界面语言(中文 / English中文
接口类型Ollama 或 OpenAI 兼容Ollama
接口地址API 服务地址http://127.0.0.1:11434
模型名称AI 模型qwen2:7b
API Key仅在托管服务需要时填写(空)
Temperature随机性 (0–2)0.1
根文件夹所有模块文件夹的父目录智学助手
题目文件夹生成题目保存路径题目
错题文件夹错题保存路径错题
笔记文件夹学习笔记保存路径笔记
知识点文件夹知识点索引保存路径知识点
排除文件夹不参与扫描的文件夹.trash, 模板, templates

复习间隔预设

模块慢速标准快速
错题2,5,10,20,40,601,2,4,7,15,301,1,3,5,10,20
题目10,20,40,80,1207,15,30,60,904,8,18,40,60
笔记3,8,20,45,802,6,14,35,701,1,2,3,5

界面

侧边栏共有 6 个 Tab

Tab功能
🏠 首页统计概览(4 卡片)+ 学习热力图 + 复习提醒 + 快捷操作
📝 题目出题设置、题目文件管理、文件选择器
📋 笔记从文件创建学习笔记、笔记管理
❌ 错题错题列表、详情、复习、导出、重生成
📊 复习统一改版到期复习看板,支持筛选 / 排序 / 一键完成
⚙️ 设置所有配置项

技术栈

技术用途
Obsidian API插件平台
TypeScript开发语言
esbuild构建工具
docxWord 文档生成
SM-2间隔重复算法

更新日志

v2.1.0

  • 一键中英文切换 — 全部 Tab 约 500 条 UI 文案接入中英文字典,在设置页(或侧边栏设置内)一键切换、即时生效。
  • AI 提示词双语化 — 出题、识别试卷、生成笔记、添加标签的提示词支持中英文,保留「语言与材料一致」规则。
  • 英文解析与导出兼容 — 题目解析器与导出器识别 Answer: / Explanation: / Answer Summary 等英文标签,英文材料出的题可正常解析与导出。
  • 字典回退机制 — 漏翻文案自动显示原文,界面永不空白。
  • 动态脚本剥离正则改为与 minifier 变量名无关,createElement("script") 始终保持 0 处,满足 Obsidian 审核 lint。
  • 153 项测试全部通过(新增:字典完整性、占位符替换、提示词双语、英文解析);tsc 0 错误、ESLint 0 errors。

v2.0.1

  • 清除 setimmediate 依赖残留的动态 <script> 注入(Obsidian 审核 lint 报错的靶点),createElement("script") 由 3 处降为 0 处,解除社区审核阻塞。

v2.0.0

  • 知识点索引重建更可靠 — 单个标签写入失败不再中断整个重建;过期索引一次性全部清理。
  • 复习进度跨会话持久化 — 间隔 / 答对次数以数字存储,间隔重复连续记录不再因重载被重置。
  • 热力图响应式 — 使用滑动条、自动定位当天,并在调整侧边栏时始终钉在当天。
  • 新增系统化测试套件(知识点索引、文档服务、笔记服务、修复验证)。

支持

如果这个插件对你的学习有帮助,欢迎在 GitHub 上给一个 ⭐!

GitHub: https://github.com/xxinjie21/Smart-Quiz-Tutor

如有问题或建议,请 提交 Issue


许可

ISC License

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.