Skip to content

MyCodeBattle/CaseSearch

Repository files navigation

完美类案检索

行政处罚决定书类案检索系统,包含向量检索与 LLM 分析流程,并提供 Web UI 与 API。

快速开始

  • pip install -r requirements.txt
  • python app.py(开发服务默认 http://localhost:5001
  • gunicorn app:app --timeout 600(生产风格启动)

常用脚本

  • python scripts/build_index.py --force(重建 Chroma 索引)
  • python scripts/build_index.py --abstracts(构建摘要索引)
  • python scripts/generate_jsonl.py --input-dir ./total_texts --output batch_requests.jsonl
  • python scripts/insert_abstracts.py(默认读取 total_texts/abstract/results.jsonl
  • python verify_config.py(校验配置与 API Key)

目录结构

  • app.py:Flask 入口与 API 路由
  • modules/:核心 RAG 逻辑(配置、加载、检索、合并)
  • prompts/:提示词模板
  • scripts/:索引构建与批处理脚本
  • templates/static/:Web UI 视图与资源
  • tests/:测试与问题复现脚本
  • total_texts/:案件原始文本与索引数据(含 chroma_db/abstract/
  • artifacts/:运行产物与归档
  • artifacts/logs/:运行日志
  • artifacts/debug/:调试输出
  • artifacts/intermediate_results/:Embedding 中间结果
  • artifacts/legacy/:历史备份与旧产物

配置与数据

  • config.yaml:本地配置
  • config.yaml.example:配置模板
  • .envsecrets.yaml:敏感配置(请勿提交)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published