面向 Python 编程与数据分析课程的 AI 辅助教学平台。
平台围绕三个教学问题设计:每个学生究竟哪里没学会?班级共同沉淀的知识怎样可信、可检索?学生遇到困难时,怎样引导他们自己想清楚,避免直接给答案?
平台追踪每个知识点的掌握概率,把完成情况、作业表现和答题行为共同纳入学习状态。
提交一份 Jupyter Notebook 作业后,系统会运行代码、用大语言模型按多维度评分,同时把答题行为喂给知识追踪模型(基于 SimpleKT)。模型以掌握度向量呈现结果,例如 pandas 切片:0.82,循环控制:0.41,异常处理:0.23。
掌握度向量有两个用途:
- 复习调度:基于 FSRS 遗忘曲线算法,系统计算每个知识点的"稳定性"和"下次复习时间",在记忆衰减前按知识点分别推送复习提醒。
- 检索优先级:提问时,系统把掌握度低的知识点注入检索请求,从知识库里优先召回与弱项相关的内容。
你在知识图谱上能直接看到哪些节点是红色、哪些是绿色。
学生可以上传自己的学习笔记和资源。内容进入知识库前要经过教师审核;审核通过后获得对应的信任等级,并附带贡献者声誉积分。
信任等级直接影响 AI 问答的检索结果:
最终相关度得分 = 向量相似度 × 权重 + log(1 + 信任等级) × 权重
教师上传的课件信任等级最高,经审核的学生笔记次之,未审核内容不进入检索。班级里最好的笔记会自然浮到顶部,劣质内容不会污染问答结果。
这种机制也激励了贡献:贡献内容获得声誉分,声誉积累后提升信任等级,高信任等级的内容被更多人检索到。
提交作业前有一道门。
学生在独立思考阶段结束前无法请求 AI 提示。门开放后,系统先评估尝试程度(用时比例、代码改动量、复杂度),再决定给什么级别的提示。
提示是分层的:先是一个反向问题("你觉得第3行的变量此时是什么类型?"),如果还卡住,再给更具体的指向,最后才是直接提示。每个提示级别都有记录,老师能在分析仪表盘上看到:哪个知识点触发的提示最多、哪类误解最常见、多少学生在第几层就解决了问题。
8 个后端服务,通过统一网关对外暴露。
graph TD
Users["学生 / 教师 / 管理员"]
GW["Kong API Gateway<br/>鉴权 · 限速 · 路由"]
subgraph SVC ["后端服务"]
LMS["LMS 核心服务<br/>课程 · 作业 · 成绩 · 用户"]
COM["社区与讨论服务<br/>内容共建 · 论坛 · 同伴评审"]
AI["AI 服务层<br/>知识图谱生成 · 智能问答 · 知识追踪 · AI 辅导"]
end
subgraph STORE ["数据存储"]
PG[("openGauss<br/>业务数据")]
TG[("TuGraph<br/>知识图谱")]
QD[("Qdrant<br/>向量检索")]
end
Users --> GW
GW --> LMS & COM & AI
LMS & COM --> PG
AI --> TG & QD
LMS --> QD
前端:Web(Next.js 15 + React 19)· iOS / Android(React Native)· 鸿蒙(原生 ArkTS)· 桌面(Electron / Tauri)
前置要求:已安装 Docker Desktop,docker compose 可用。
# 1. 克隆仓库
git clone https://github.com/rocinc/python-data-nexus.git
cd edu-platform
# 2. 启动基础设施(数据库、向量库、缓存等)
cd ../edu-platform-sprint0
cp .env.example .env # 填写阿里云 MaaS API Key 和华为云 OBS 密钥
docker compose --profile local-dev up -d
# 3. 初始化数据库
cd ../edu-platform
python -m alembic -c services/lms-core/alembic.ini upgrade head
# 4. 启动 Web 前端
pnpm install
pnpm --filter web dev
# 打开 http://localhost:3000代码执行沙箱在 Docker 内运行,与宿主机完全隔离。LLM 功能需要有效的 API Key。
edu-platform/
├── apps/
│ ├── web/ # Next.js Web 前端
│ └── harmonyos/ # HarmonyOS ArkTS 端(需 DevEco Studio 编译)
├── services/
│ ├── lms-core/ # 核心业务:课程、作业、成绩、用户、学习者状态
│ ├── community/ # 社区内容:上传、审核、声誉系统
│ ├── discussion/ # 讨论:问答社区、批注、同伴评审
│ ├── lightrag/ # 知识图谱生成 + RAG 三路检索
│ ├── ai-tutor/ # AI 辅导:苏格拉底引导、反直接给答案、FSRS 调度
│ ├── pykt/ # 知识追踪推理(SimpleKT)
│ ├── ralph-lrs/ # 学习行为记录(xAPI 标准)
│ └── gateway/ # Kong Gateway 配置
├── packages/ # 跨服务共享代码
├── design/ # 系统设计文档(C4 图、数据模型、ADR)
└── docs/ # 实现说明
An AI-assisted teaching platform for Python programming and data analysis courses.
The platform is designed around three teaching questions: What exactly has each student failed to master? How can the class's shared knowledge become trustworthy and retrievable? When a student gets stuck, how can the system guide them to think it through before showing an answer?
The platform tracks mastery probability per knowledge concept, with completion data treated as one signal in the learning state.
When a student submits a Jupyter Notebook, the system runs the code, scores it across multiple rubric dimensions using an LLM, and feeds the interaction into a knowledge tracing model (based on SimpleKT). The model returns a mastery vector such as pandas slicing: 0.82, loop control: 0.41, exception handling: 0.23.
That mastery vector has two jobs:
- Review scheduling: The FSRS algorithm tracks the "stability" and "retrievability" of each concept and schedules concept-specific review reminders before memory decays.
- Retrieval priority: When a student asks a question, weak concepts are injected into the search query so the knowledge base returns content relevant to what they don't know yet.
Students can see which nodes on the knowledge graph are red and which are green.
Students can upload their own notes and resources. Before content enters the knowledge base, it goes through teacher review. Approved content receives a trust level with corresponding contributor reputation.
Trust level directly influences what the AI Q&A system returns:
final relevance score = vector similarity × weight + log(1 + trust_level) × weight
Teacher-authored materials rank highest. Reviewed student notes rank second. Retrieval uses approved material only, so the class's best notes naturally surface and low-quality content stays out of answers.
The mechanism also incentivizes contribution: approved content earns reputation points, higher reputation raises trust level, and higher trust level means more retrieval visibility.
There's a gate before AI hints become available.
Students cannot request AI hints until the independent-thinking phase ends. After that gate opens, the system evaluates effort (time elapsed ratio, code diff ratio, complexity ratio) before deciding what level of hint to provide.
Hints are layered: first a probing question ("What type do you think that variable is at line 3?"), then a more directed hint if still stuck, then a direct hint as a last resort. Every hint level is logged, so teachers can see in the analytics dashboard: which concepts trigger the most hints, what misconceptions appear most often, and at what hint level students tend to resolve their confusion.
8 backend services exposed through a unified gateway.
graph TD
Users["Students / Instructors / Admins"]
GW["Kong API Gateway<br/>Auth · Rate limiting · Routing"]
subgraph SVC ["Backend Services"]
LMS["LMS Core<br/>Courses · Tasks · Grades · Users"]
COM["Community & Discussion<br/>Uploads · Review · Forum · Peer review"]
AI["AI Layer<br/>Knowledge graph · Q&A · Knowledge tracing · AI Tutor"]
end
subgraph STORE ["Data Storage"]
PG[("openGauss<br/>Business data")]
TG[("TuGraph<br/>Knowledge graph")]
QD[("Qdrant<br/>Vector search")]
end
Users --> GW
GW --> LMS & COM & AI
LMS & COM --> PG
AI --> TG & QD
LMS --> QD
Frontends: Web (Next.js 15 + React 19) · iOS / Android (React Native) · HarmonyOS (native ArkTS) · Desktop (Electron / Tauri)
Prerequisites: Docker Desktop installed, docker compose available.
# 1. Clone the repository
git clone https://github.com/rocinc/python-data-nexus.git
cd edu-platform
# 2. Start infrastructure (databases, vector store, cache, etc.)
cd ../edu-platform-sprint0
cp .env.example .env # fill in Alibaba Cloud MaaS API key and Huawei OBS credentials
docker compose --profile local-dev up -d
# 3. Apply database migrations
cd ../edu-platform
python -m alembic -c services/lms-core/alembic.ini upgrade head
# 4. Start the web frontend
pnpm install
pnpm --filter web dev
# Open http://localhost:3000The code execution sandbox runs inside Docker, isolated from the host. LLM features require a valid API key.
edu-platform/
├── apps/
│ ├── web/ # Next.js web frontend
│ └── harmonyos/ # HarmonyOS ArkTS app (requires DevEco Studio)
├── services/
│ ├── lms-core/ # Core: courses, tasks, grades, users, learner state
│ ├── community/ # Community: uploads, review workflow, reputation
│ ├── discussion/ # Discussion: Q&A forum, annotations, peer review
│ ├── lightrag/ # Knowledge graph generation + 3-path RAG retrieval
│ ├── ai-tutor/ # AI tutoring: Socratic hints, anti-handout gate, FSRS scheduling
│ ├── pykt/ # Knowledge tracing inference (SimpleKT)
│ ├── ralph-lrs/ # Learning record store (xAPI standard)
│ └── gateway/ # Kong Gateway configuration
├── packages/ # Shared code across services
├── design/ # System design docs (C4 diagrams, data model, ADRs)
└── docs/ # Implementation notes
Built with Python · Next.js · ArkTS · open-source AI tooling