chore: sync local code on 2026-06-08#133
Open
yzj-hsz wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
backend/core/rag.py,支持题干、选项、答案、用户作答、科目、题型、知识点标签的统一索引与语义检索GET /api/error-bank/find接入真实 embedding 检索,优先使用 RAG 语义召回;当 embedding 未配置或不可用时,自动降级到现有 hash 检索,保证接口可用性POST /api/rag/reindex,支持按当前用户或项目重建错题 RAG 索引,便于历史数据补建和调试reindex_all.py、backend/check_pg.py和backend/benchmark/recall.py,分别用于全量重建索引、检查 pgvector 能力和做 Recall@K 离线评测rag-development-plan.md,沉淀错题库与笔记 RAG 的阶段性设计、验收指标和后续扩展方向Test plan
GET /api/error-bank/find在 embedding 可用时返回语义检索结果,并包含合理的匹配分数与检索模式POST /api/rag/reindex可按用户 / 项目重建现有错题索引,并返回成功、跳过、失败统计backend/benchmark/recall.py可执行 Recall@K 评测,验证 RAG / hash 两种检索方式的召回效果