feat: 初始化 CS 知识应试强化系统
- 纯 HTML/CSS/JS 单页应用,支持填空题和选择题交互 - 5 个主题共 100 道题(GC/JVM、AI 结构化输出、记忆管理、幻觉、工具链) - 按主题组织、按题型拆分的 JSON 数据结构 - JSON Schema 校验 + 提示词模板 + 题型模板 - 自定义导入功能(粘贴/上传 JSON) - 项目文档(需求 + 架构) Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,188 @@
|
||||
{
|
||||
"topic": "ai-memory",
|
||||
"type": "fill_blank",
|
||||
"schema_version": "1.0.0",
|
||||
"generated": "2026-09-02T00:00:00Z",
|
||||
"questions": [
|
||||
{
|
||||
"id": "fb-001",
|
||||
"type": "fill_blank",
|
||||
"difficulty": 2,
|
||||
"tags": [
|
||||
"ai",
|
||||
"memory",
|
||||
"lru"
|
||||
],
|
||||
"question": "Agent 记忆分层架构的四种记忆类型是:工作记忆、情景记忆、语义记忆和______记忆。",
|
||||
"explanation": "记忆分层由工作记忆(短期)、情景记忆(中期)、语义记忆(长期)和程序性记忆组成。",
|
||||
"source": null,
|
||||
"related": [],
|
||||
"answer": [
|
||||
"程序性"
|
||||
],
|
||||
"answer_rule": "any"
|
||||
},
|
||||
{
|
||||
"id": "fb-002",
|
||||
"type": "fill_blank",
|
||||
"difficulty": 2,
|
||||
"tags": [
|
||||
"ai",
|
||||
"memory",
|
||||
"lru"
|
||||
],
|
||||
"question": "记忆的正确流转顺序是:工作记忆 → 情景记忆 → 语义记忆 → ______记忆。",
|
||||
"explanation": "工作记忆在会话结束后转为情景记忆,提炼为语义记忆,最终指导程序性记忆。",
|
||||
"source": null,
|
||||
"related": [],
|
||||
"answer": [
|
||||
"程序性"
|
||||
],
|
||||
"answer_rule": "any"
|
||||
},
|
||||
{
|
||||
"id": "fb-003",
|
||||
"type": "fill_blank",
|
||||
"difficulty": 2,
|
||||
"tags": [
|
||||
"ai",
|
||||
"memory",
|
||||
"lru"
|
||||
],
|
||||
"question": "LRU 缓存使用什么数据结构组合来实现 O(1) 的访问和淘汰?",
|
||||
"explanation": "LRU 使用双向链表维护顺序,哈希表实现 O(1) 查找。",
|
||||
"source": null,
|
||||
"related": [],
|
||||
"answer": [
|
||||
"双向链表 + 哈希表"
|
||||
],
|
||||
"answer_rule": "any"
|
||||
},
|
||||
{
|
||||
"id": "fb-004",
|
||||
"type": "fill_blank",
|
||||
"difficulty": 2,
|
||||
"tags": [
|
||||
"ai",
|
||||
"memory",
|
||||
"lru"
|
||||
],
|
||||
"question": "混合记忆淘汰策略的评分公式是:score = α × 时间衰减(t) + β × 频率(f) + γ × ______(i)。",
|
||||
"explanation": "混合策略综合考虑时间衰减、访问频率和重要性三个维度。",
|
||||
"source": null,
|
||||
"related": [],
|
||||
"answer": [
|
||||
"重要性"
|
||||
],
|
||||
"answer_rule": "any"
|
||||
},
|
||||
{
|
||||
"id": "fb-005",
|
||||
"type": "fill_blank",
|
||||
"difficulty": 2,
|
||||
"tags": [
|
||||
"ai",
|
||||
"memory",
|
||||
"lru"
|
||||
],
|
||||
"question": "混合策略中,时间衰减通常使用什么数学函数计算?",
|
||||
"explanation": "时间衰减函数如 e^(-λt),其中 t 是距上次访问的时间。",
|
||||
"source": null,
|
||||
"related": [],
|
||||
"answer": [
|
||||
"e^(-λt)"
|
||||
],
|
||||
"answer_rule": "any"
|
||||
},
|
||||
{
|
||||
"id": "fb-006",
|
||||
"type": "fill_blank",
|
||||
"difficulty": 2,
|
||||
"tags": [
|
||||
"ai",
|
||||
"memory",
|
||||
"lru"
|
||||
],
|
||||
"question": "记忆系统中,余弦相似度超过______时触发冲突检测。",
|
||||
"explanation": "语义相似度的余弦值 > 0.8 时,记忆对进入冲突检测。",
|
||||
"source": null,
|
||||
"related": [],
|
||||
"answer": [
|
||||
"0.8"
|
||||
],
|
||||
"answer_rule": "any"
|
||||
},
|
||||
{
|
||||
"id": "fb-007",
|
||||
"type": "fill_blank",
|
||||
"difficulty": 2,
|
||||
"tags": [
|
||||
"ai",
|
||||
"memory",
|
||||
"lru"
|
||||
],
|
||||
"question": "部分记忆冲突消解中,当评分差值小于______时无法自动消解,需要向用户澄清。",
|
||||
"explanation": "当评分差值 < 0.1 时,系统无法自动判定,需主动向用户确认。",
|
||||
"source": null,
|
||||
"related": [],
|
||||
"answer": [
|
||||
"0.1"
|
||||
],
|
||||
"answer_rule": "any"
|
||||
},
|
||||
{
|
||||
"id": "fb-008",
|
||||
"type": "fill_blank",
|
||||
"difficulty": 2,
|
||||
"tags": [
|
||||
"ai",
|
||||
"memory",
|
||||
"lru"
|
||||
],
|
||||
"question": "完全记忆冲突的风险等级分为两类:______(危险)和安全。",
|
||||
"explanation": "Critical 包括医疗、金融、生产环境配置等;Safe 包括代码风格、文档格式等。",
|
||||
"source": null,
|
||||
"related": [],
|
||||
"answer": [
|
||||
"Critical"
|
||||
],
|
||||
"answer_rule": "any"
|
||||
},
|
||||
{
|
||||
"id": "fb-009",
|
||||
"type": "fill_blank",
|
||||
"difficulty": 2,
|
||||
"tags": [
|
||||
"ai",
|
||||
"memory",
|
||||
"lru"
|
||||
],
|
||||
"question": "安全环境的 YAML 配置中,三条优先级规则的权重分别是:时间 0.4、来源 0.4、______ 0.2。",
|
||||
"explanation": "安全环境使用时间(0.4)、来源优先级(0.4)和访问次数(0.2)。",
|
||||
"source": null,
|
||||
"related": [],
|
||||
"answer": [
|
||||
"访问次数"
|
||||
],
|
||||
"answer_rule": "any"
|
||||
},
|
||||
{
|
||||
"id": "fb-010",
|
||||
"type": "fill_blank",
|
||||
"difficulty": 2,
|
||||
"tags": [
|
||||
"ai",
|
||||
"memory",
|
||||
"lru"
|
||||
],
|
||||
"question": "记忆冲突解决中,来源可信度的优先级顺序是:用户明确告知 > 从对话推断 > ______。",
|
||||
"explanation": "用户明确告知的可信度最高,其次是对话推断,最后是自动生成。",
|
||||
"source": null,
|
||||
"related": [],
|
||||
"answer": [
|
||||
"自动生成"
|
||||
],
|
||||
"answer_rule": "any"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"slug": "ai-memory",
|
||||
"name": "Agent 记忆管理 / 冲突处理",
|
||||
"description": "记忆分层架构、淘汰策略、冲突检测与消解",
|
||||
"tags": [
|
||||
"ai",
|
||||
"memory",
|
||||
"lru",
|
||||
"lfu",
|
||||
"conflict-resolution"
|
||||
],
|
||||
"difficulty_range": [
|
||||
1,
|
||||
5
|
||||
],
|
||||
"schema_version": "1.0.0",
|
||||
"question_files": [
|
||||
"fill_blank",
|
||||
"single_choice"
|
||||
],
|
||||
"stats": {
|
||||
"total": 20,
|
||||
"by_type": {
|
||||
"fill_blank": 10,
|
||||
"single_choice": 10
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,218 @@
|
||||
{
|
||||
"topic": "ai-memory",
|
||||
"type": "single_choice",
|
||||
"schema_version": "1.0.0",
|
||||
"generated": "2026-09-02T00:00:00Z",
|
||||
"questions": [
|
||||
{
|
||||
"id": "sc-001",
|
||||
"type": "single_choice",
|
||||
"difficulty": 3,
|
||||
"tags": [
|
||||
"ai",
|
||||
"memory",
|
||||
"lru"
|
||||
],
|
||||
"question": "哪种记忆类型代表历史交互记录?",
|
||||
"explanation": "情景记忆(Episodic Memory)存储过去会话的历史交互记录。",
|
||||
"source": null,
|
||||
"related": [],
|
||||
"options": {
|
||||
"A": "工作记忆",
|
||||
"B": "情景记忆",
|
||||
"C": "语义记忆",
|
||||
"D": "程序性记忆"
|
||||
},
|
||||
"answer": "B"
|
||||
},
|
||||
{
|
||||
"id": "sc-002",
|
||||
"type": "single_choice",
|
||||
"difficulty": 3,
|
||||
"tags": [
|
||||
"ai",
|
||||
"memory",
|
||||
"lru"
|
||||
],
|
||||
"question": "LRU 淘汰策略的缺点是什么?",
|
||||
"explanation": "LRU 不考虑访问频率——一次访问就能让条目「续命」。",
|
||||
"source": null,
|
||||
"related": [],
|
||||
"options": {
|
||||
"A": "实现复杂度高",
|
||||
"B": "不考虑访问频率,一次访问就能「续命」",
|
||||
"C": "历史热点问题",
|
||||
"D": "O(n) 时间复杂度"
|
||||
},
|
||||
"answer": "B"
|
||||
},
|
||||
{
|
||||
"id": "sc-003",
|
||||
"type": "single_choice",
|
||||
"difficulty": 3,
|
||||
"tags": [
|
||||
"ai",
|
||||
"memory",
|
||||
"lru"
|
||||
],
|
||||
"question": "「历史热点问题」与哪种策略相关?",
|
||||
"explanation": "LFU 有历史热点问题:早期高频但后期不再使用的记忆难以被淘汰。",
|
||||
"source": null,
|
||||
"related": [],
|
||||
"options": {
|
||||
"A": "LRU 策略",
|
||||
"B": "LFU 策略",
|
||||
"C": "混合策略",
|
||||
"D": "FIFO 策略"
|
||||
},
|
||||
"answer": "B"
|
||||
},
|
||||
{
|
||||
"id": "sc-004",
|
||||
"type": "single_choice",
|
||||
"difficulty": 3,
|
||||
"tags": [
|
||||
"ai",
|
||||
"memory",
|
||||
"lru"
|
||||
],
|
||||
"question": "当两条记忆因上下文不同(如不同项目)而冲突时,应该使用哪种策略?",
|
||||
"explanation": "上下文化策略:如果上下文不同(不同项目/时期),两条记忆都保留。",
|
||||
"source": null,
|
||||
"related": [],
|
||||
"options": {
|
||||
"A": "时间衰减",
|
||||
"B": "来源可信度",
|
||||
"C": "上下文化",
|
||||
"D": "置信度加权"
|
||||
},
|
||||
"answer": "C"
|
||||
},
|
||||
{
|
||||
"id": "sc-005",
|
||||
"type": "single_choice",
|
||||
"difficulty": 3,
|
||||
"tags": [
|
||||
"ai",
|
||||
"memory",
|
||||
"lru"
|
||||
],
|
||||
"question": "安全环境 YAML 配置中,来源优先级的权重是多少?",
|
||||
"explanation": "来源优先级在安全环境配置中的权重是 0.4。",
|
||||
"source": null,
|
||||
"related": [],
|
||||
"options": {
|
||||
"A": "0.2",
|
||||
"B": "0.3",
|
||||
"C": "0.4",
|
||||
"D": "0.5"
|
||||
},
|
||||
"answer": "C"
|
||||
},
|
||||
{
|
||||
"id": "sc-006",
|
||||
"type": "single_choice",
|
||||
"difficulty": 3,
|
||||
"tags": [
|
||||
"ai",
|
||||
"memory",
|
||||
"lru"
|
||||
],
|
||||
"question": "在危险环境中,对于 Critical 级别的记忆冲突应该怎么做?",
|
||||
"explanation": "危险环境中,系统停止自动决策,输出冲突记忆并等待人工决策。",
|
||||
"source": null,
|
||||
"related": [],
|
||||
"options": {
|
||||
"A": "按优先级规则自动采纳",
|
||||
"B": "保留较新的记忆",
|
||||
"C": "停止自动决策,输出两条冲突记忆,等待人工决策",
|
||||
"D": "删除两条冲突记忆"
|
||||
},
|
||||
"answer": "C"
|
||||
},
|
||||
{
|
||||
"id": "sc-007",
|
||||
"type": "single_choice",
|
||||
"difficulty": 3,
|
||||
"tags": [
|
||||
"ai",
|
||||
"memory",
|
||||
"lru"
|
||||
],
|
||||
"question": "除了余弦相似度,还有什么 NLP 技术用于冲突检测?",
|
||||
"explanation": "NLI 矛盾检测与语义相似度一起用于冲突检测。",
|
||||
"source": null,
|
||||
"related": [],
|
||||
"options": {
|
||||
"A": "情感分析",
|
||||
"B": "命名实体识别",
|
||||
"C": "自然语言推理(NLI)矛盾检测",
|
||||
"D": "词性标注"
|
||||
},
|
||||
"answer": "C"
|
||||
},
|
||||
{
|
||||
"id": "sc-008",
|
||||
"type": "single_choice",
|
||||
"difficulty": 3,
|
||||
"tags": [
|
||||
"ai",
|
||||
"memory",
|
||||
"lru"
|
||||
],
|
||||
"question": "哪种记忆来源在冲突解决中可信度最高?",
|
||||
"explanation": "用户明确告知(user_explicit)的可信度最高(importance=1.0)。",
|
||||
"source": null,
|
||||
"related": [],
|
||||
"options": {
|
||||
"A": "自动生成",
|
||||
"B": "从对话推断",
|
||||
"C": "用户确认过的推断",
|
||||
"D": "用户明确告知"
|
||||
},
|
||||
"answer": "D"
|
||||
},
|
||||
{
|
||||
"id": "sc-009",
|
||||
"type": "single_choice",
|
||||
"difficulty": 3,
|
||||
"tags": [
|
||||
"ai",
|
||||
"memory",
|
||||
"lru"
|
||||
],
|
||||
"question": "记忆存储结构中,哪个字段记录记忆被访问了多少次?",
|
||||
"explanation": "access_count 字段记录记忆被访问的次数,用于频率计算。",
|
||||
"source": null,
|
||||
"related": [],
|
||||
"options": {
|
||||
"A": "last_accessed",
|
||||
"B": "confidence",
|
||||
"C": "access_count",
|
||||
"D": "importance"
|
||||
},
|
||||
"answer": "C"
|
||||
},
|
||||
{
|
||||
"id": "sc-010",
|
||||
"type": "single_choice",
|
||||
"difficulty": 3,
|
||||
"tags": [
|
||||
"ai",
|
||||
"memory",
|
||||
"lru"
|
||||
],
|
||||
"question": "在安全环境中,当优先级规则无法解决冲突时,回退策略是什么?",
|
||||
"explanation": "安全环境中,优先级规则无法判定时的回退策略是 ask_user。",
|
||||
"source": null,
|
||||
"related": [],
|
||||
"options": {
|
||||
"A": "删除较旧的记忆",
|
||||
"B": "保留两条记忆",
|
||||
"C": "询问用户",
|
||||
"D": "随机选择"
|
||||
},
|
||||
"answer": "C"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user