Git Product home page Git Product logo

laborlawassistant's Introduction

劳动法知识库检索助手

OpenXLab 体验地址:

劳动法知识库检索助手 模型下载地址:

  • OpenXLab:

此仓库主要将 劳动法知识库助手项目 部署到 OpenXLab 上。

介绍

劳动法知识库助手是利用自然语言处理技术,对劳动法相关的法律文本进行分析,提取关键信息,构建知识库,实现劳动法相关问题的检索。它基于InternLM2进行 QLoRA 微调,同时结合 RAG 技术实现知识库的构建。

数据集

劳动法知识库助手 数据集采用路径data/下的劳动法相关政策文件和案例文件作为数据集,使用create_db.py使用 Chroma 创建向量数据库,使用gen_dataset.py生成微调数据集。

微调

使用 Xtuner 进行微调,具体配置脚本可参考internlm2_chat_7b_qlora_oasst1_e3_copy.py,该文件在train文件夹中,脚本内有详细的参数解释。

RAG

使用 RAG 技术构建知识库,通过LLM.py读取向量数据库,并接入 InternLM2 模型到 LangChain 中,构建检索问答链,实现劳动法知识库的检索。

Demo 展示

劳动法知识库助手的 Demo 展示可参考app.py文件,通过 Gradio 搭建 Web 服务,实现劳动法知识库的检索功能。

效果展示

实际的问答效果展示如下:

Alt text

Alt text

Alt text

laborlawassistant's People

Contributors

boomerl avatar zxdlalala avatar

Stargazers

蔡锐深 avatar

Watchers

 avatar

Forkers

zxdlalala

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.