Some checks failed
secret-scan / scan (push) Has been cancelled
The project begins with architecture, data governance, reproducible evaluation, deployment boundaries, and secret-handling contracts so later code has measurable acceptance criteria. Constraint: Real provider credentials, workspace identities, and restricted geological data must never enter Git Rejected: Add placeholder runnable services in the design commit | would imply unverified implementation readiness Confidence: high Scope-risk: narrow Reversibility: clean Directive: Run make verify before every commit and update ADRs when architecture boundaries change Tested: Secret scan, Markdown links, YAML parse, shell syntax, and staged diff validation Not-tested: Application runtime is intentionally deferred to the implementation stage
46 lines
2.4 KiB
Markdown
46 lines
2.4 KiB
Markdown
# 基于 RAG 的地质找矿知识问答系统
|
|
|
|
本仓库用于“基于 RAG 的地质找矿知识问答系统构建与应用”毕业设计。系统计划采用 Python/FastAPI 后端、React/TypeScript 前端、PostgreSQL + pgvector 向量存储,以及阿里云百炼的 `text-embedding-v4`、`qwen3-rerank`、`deepseek-v4-flash`。
|
|
|
|
当前阶段为“设计与工程骨架”。完整方案、数据构建、模型接入、Docker 部署和评测方法见 [docs/README.md](docs/README.md)。在实现阶段开始前,仓库不会伪装成已经可运行的成品。
|
|
|
|
## 目录
|
|
|
|
```text
|
|
.
|
|
├── backend/ Python 后端代码与测试
|
|
├── frontend/ React 前端代码与测试
|
|
├── docs/ 全部需求、架构、数据、评测、部署和决策文档
|
|
├── data/ 只提交清单、格式说明和允许公开的小样例
|
|
├── ops/ Docker/PostgreSQL 初始化等运维资产(不含凭证)
|
|
├── scripts/ 安全检查、导入、验证、评测和运维脚本
|
|
├── .githooks/ 本地 Git 钩子
|
|
└── .gitea/workflows/ Gitea Actions 工作流
|
|
```
|
|
|
|
## 安全红线
|
|
|
|
- 百炼 API Key 只通过 Docker Secret、环境变量或云密钥管理服务注入。
|
|
- 真实 `.env`、`secrets/`、原始受限资料和私有评测数据一律禁止提交。
|
|
- 前端不得接触模型密钥;所有模型请求只能由后端发起。
|
|
- 每次提交前运行 `make verify`。当前设计阶段它执行文档、链接、diff 和密钥检查;代码落地后将扩展为后端/前端 lint、类型、测试和镜像检查。首次克隆后运行 `make setup-hooks` 启用提交前密钥检查。
|
|
- 若密钥曾出现在聊天、日志、终端历史或提交中,立即在百炼控制台重置;仅从 Git 历史删除文件并不能让密钥恢复安全。
|
|
|
|
## 阶段交付规则
|
|
|
|
每个阶段必须按以下顺序结束:
|
|
|
|
1. 完成该阶段可验证的最小闭环。
|
|
2. 运行格式、静态检查、测试和密钥扫描。
|
|
3. 更新 `docs/` 中的状态与设计决策。
|
|
4. 使用符合 Lore 协议的提交信息提交。
|
|
5. 推送到远端,确保过程产物可追踪。
|
|
|
|
## 文档入口
|
|
|
|
- [总体设计](docs/00-overall-design.md)
|
|
- [数据与评测设计](docs/01-data-and-evaluation.md)
|
|
- [部署与安全设计](docs/02-deployment-and-security.md)
|
|
- [实施计划与验收](docs/03-implementation-plan.md)
|
|
- [架构决策记录](docs/adr/README.md)
|