coursegraph

使用大模型自动构建课程知识图谱

https://github.com/cpu-ds/coursegraph

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (5.9%) to scientific vocabulary

Keywords

knowledge-graph llm
Last synced: 6 months ago · JSON representation ·

Repository

使用大模型自动构建课程知识图谱

Basic Info
Statistics
  • Stars: 28
  • Watchers: 2
  • Forks: 4
  • Open Issues: 2
  • Releases: 0
Topics
knowledge-graph llm
Created over 1 year ago · Last pushed 9 months ago
Metadata Files
Readme License Citation

README.md

CourseGraph: 使用大模型自动构建课程知识图谱

中文 | English

CourseGraph 使用大模型,利用多种 prompt 优化技术, 自动从教材、书籍中抽取知识点, 构成以课程-章节-知识点为主题的知识图谱。为增加每个知识点的信息, CourseGraph 可以为知识点链接相应的习题、扩展阅读材料等资源, 另外也可利用多模态大模型从 pptx、图片、视频中提取信息并与之相关联。

🤔 局限性

  • 目前只实现了基本的知识图谱抽取和对 pptx 的解析,效果有待优化
  • 对视频的解析还处于规划中

📈 未来发展方向

  • 改进提示词工程,并尝试使用 Agent 完成相关工作
  • 增加多种策略对比实验
  • 基于图谱的问答 (KBQA 或 Graph-RAG)

🚀 快速使用

首先申请阿里云百炼 API Key,然后选择使用本地安装或使用 Docker 安装:

方式一:本地安装

安装依赖

请确保已安装 uvneo4jrust ,然后执行:

bash uv sync

Linux 下还需安装 libreoffice 以完成文档转换,以 Debian 系为例:

bash sudo apt install libreoffice

执行示例

提供 Neo4j 连接密码和待抽取的文件路径,然后执行:

bash uv run examples/get_knowledge_graph_pdf.py -p neo4j -f assets/deep-learning-from-scratch.pdf

方式二:使用 Docker 安装

bash docker-compose -f docker/docker-compose.yml up -d uv run examples/get_knowledge_graph_pdf.py -f assets/deep-learning-from-scratch.pdf

📚 文档

可以在 docs 目录下查看文档, 也可以访问 在线文档 (由于项目功能仍处于快速开发中,故在线文档暂时还没有准备好)。

如果你希望自定义在线文档请依照以下步骤:

依赖安装和预览

文档使用 vitepress 构建, 需安装 node.js 18 或以上版本,然后执行:

bash cd docs npm i npm run dev

使用浏览器打开 http://localhost:5173/ 即可进行预览。

🛠️ 贡献、协议和引用

欢迎提交 PRIssues,也欢迎参与任何形式的贡献。

本项目基于 MIT 协议 开源。

如果觉得 CourseGraph 项目有助于你的工作,请点击 Repository 右侧的 Cite this repository 按钮进行引用。

Owner

  • Name: CPU-DS
  • Login: CPU-DS
  • Kind: organization

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Wang"
  given-names: "Tao"
  orcid:
- family-names: "Hou"
  given-names: "Fengzhen"
  orcid:
title: "CourseGraph"
version: 0.1.0
doi: 
date-released: 2024-12-19
url: "https://github.com/CPU-DS/CourseGraph"

GitHub Events

Total
  • Issues event: 5
  • Watch event: 34
  • Delete event: 2
  • Issue comment event: 4
  • Push event: 68
  • Fork event: 6
  • Create event: 5
Last Year
  • Issues event: 5
  • Watch event: 34
  • Delete event: 2
  • Issue comment event: 4
  • Push event: 68
  • Fork event: 6
  • Create event: 5

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 4
  • Total pull requests: 0
  • Average time to close issues: 10 days
  • Average time to close pull requests: N/A
  • Total issue authors: 4
  • Total pull request authors: 0
  • Average comments per issue: 0.25
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 4
  • Pull requests: 0
  • Average time to close issues: 10 days
  • Average time to close pull requests: N/A
  • Issue authors: 4
  • Pull request authors: 0
  • Average comments per issue: 0.25
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Lcq2002 (1)
  • LuYF-Lemon-love (1)
  • Snoming (1)
  • ZMQGwsyw (1)
Pull Request Authors
Top Labels
Issue Labels
bug (1) documentation (1)
Pull Request Labels

Dependencies

.github/workflows/docs.yml actions
  • actions/checkout v3 composite
  • actions/configure-pages v3 composite
  • actions/deploy-pages v2 composite
  • actions/setup-node v3 composite
  • actions/upload-pages-artifact v2 composite
docker/Dockerfile docker
  • ubuntu 22.04 build
docker/docker-compose.yml docker
  • neo4j 5.13.0
docs/package-lock.json npm
  • 125 dependencies
docs/package.json npm
  • vitepress ^1.3.1 development
pyproject.toml pypi
  • accelerate 0.33.0
  • comtypes 1.4.6
  • doclayout-yolo ^0.0.2
  • docstring-parser ^0.16
  • faiss-gpu 1.7.2
  • fitz 0.0.1.dev2
  • json5 0.9.25
  • jupyter ^1.1.1
  • loguru 0.7.2
  • maturin 1.7.4
  • modelscope 1.16.1
  • ollama 0.3.3
  • openai 1.43.1
  • opencv-python 4.10.0.84
  • paddleocr 2.8.1
  • paddlepaddle 2.6.1
  • patchelf 0.17.2.1
  • py2neo 2021.2.4
  • pymongo 4.8.0
  • pymupdf 1.24.10
  • python ^3.10
  • python-docx 1.1.2
  • python-pptx-interface 0.0.12
  • pytorch-crf 0.7.2
  • ray 2.35.0
  • sentence-transformers 3.0.1
  • setuptools 69.5.1
  • shortuuid ^1.0.13
  • torch 2.4.0
  • torchvision 0.19
  • tqdm 4.66.4
  • transformers 4.43.3
  • verovio 4.3.1
  • vllm 0.6.1.post2
Cargo.lock cargo
  • aho-corasick 1.1.3
  • autocfg 1.4.0
  • byteorder 1.5.0
  • cfg-if 1.0.0
  • getrandom 0.2.15
  • heck 0.5.0
  • indoc 2.0.6
  • libc 0.2.170
  • memchr 2.7.4
  • memoffset 0.9.1
  • once_cell 1.20.3
  • portable-atomic 1.11.0
  • ppv-lite86 0.2.20
  • proc-macro2 1.0.94
  • pyo3 0.22.6
  • pyo3-build-config 0.22.6
  • pyo3-ffi 0.22.6
  • pyo3-macros 0.22.6
  • pyo3-macros-backend 0.22.6
  • quote 1.0.39
  • rand 0.8.5
  • rand_chacha 0.3.1
  • rand_core 0.6.4
  • regex 1.11.1
  • regex-automata 0.4.9
  • regex-syntax 0.8.5
  • syn 2.0.99
  • target-lexicon 0.12.16
  • unicode-ident 1.0.18
  • unindent 0.2.4
  • wasi 0.11.0+wasi-snapshot-preview1
  • zerocopy 0.7.35
  • zerocopy-derive 0.7.35
Cargo.toml cargo
uv.lock pypi
  • 323 dependencies