Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Knowledge-Guided Data Generation, KgDG

License

NotificationsYou must be signed in to change notification settings

LAMDASZ-ML/Knowledge-Guide-Data-Generation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A tool for generating and polishing legal question-answering data using large language models.We provide 50K legal question-answering data for training, including 25K standard version (./data/Standard-25K.json) and 25K enhanced version with reasoning paths (./data/Reasoning-25K.json).

Environment

pip install -r requirements.txt

Usage

The project consists of three main components:

  • ./src/generate.py: Generates initial legal QA data by utilizing seed questions fromseed.json and legal knowledge from thereference directory
  • ./src/polish.py: Enhances the generated data by validating legal references and optimizing reasoning paths
  • ./src/verify.py: Performs quality assurance by checking the accuracy and logical consistency of answers, reasoning paths, and legal references

You should prepare your knowledge base in thereference directory. Here, we provide a sample knowledge base with two legal documents. And the seed problem set shoud be provided inseed.json. Finally, you can sequentially run the three components to generate the final data.

Note that the API key for DeepSeek is required to be set in three code respectively.

About

Knowledge-Guided Data Generation, KgDG

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp