### Install Dependencies and Configure Environment Source: https://github.com/xmudeeplit/legalgraphrag/blob/main/README.md Installs project dependencies and copies the example environment file. Remember to edit the `.env` file with your specific settings. ```bash pip install -r requirements.txt cp env.example .env # Edit .env with model paths, API keys, and runtime settings ``` -------------------------------- ### Prepare Data for CAIL Example Source: https://github.com/xmudeeplit/legalgraphrag/blob/main/README.md Prepares all required data for the CAIL example by running a Python script. Ensure raw data files are placed in the `./raw_data/` directory. ```bash python scripts/prepare_data.py --dotenv-path .env --raw-data-dir ./raw_data ``` -------------------------------- ### Example Output Summary Structure Source: https://github.com/xmudeeplit/legalgraphrag/blob/main/README.md Illustrates the structure of the output summary file generated after a successful evaluation. This includes model and dataset information, performance metrics, and output file paths. ```json { "model_name": "qwen3", "dataset": "CAIL", "total_cases": 1000, "correct_count": 850, "elapsed_time": 3600.0, "output_file": "./outputs/CAIL/qwen3_results_combined.json" } ``` -------------------------------- ### Run Evaluation with Specified Model and Datasets Source: https://github.com/xmudeeplit/legalgraphrag/blob/main/README.md Executes the evaluation pipeline using a specified model and dataset. This command can be configured with various arguments to control the evaluation process. ```bash python run.py --model qwen3 --datasets CAIL --devices cuda:2 cuda:3 ``` -------------------------------- ### Run with Multi-GPU Source: https://github.com/xmudeeplit/legalgraphrag/blob/main/README.md Execute the run script on multiple GPUs by specifying device IDs. Cases are automatically distributed. ```bash python run.py --model qwen3 --datasets CAIL --devices cuda:0 cuda:1 cuda:2 cuda:3 ``` -------------------------------- ### Project Structure Overview Source: https://github.com/xmudeeplit/legalgraphrag/blob/main/README.md Provides a hierarchical view of the LegalGraphRAG project's directories and core modules. Useful for understanding the organization of the codebase. ```text LegalGraphRAG/ ├── core/ # Core modules │ ├── LegalGraphRAG.py # Main LegalGraphRAG class │ ├── models/ # Model implementations │ │ ├── transformers/ # Transformers-based models (Qwen, InternLM, GLM, Gemma) │ │ └── openai/ # OpenAI-compatible models (DeepSeek, GPT) │ ├── graph_construct/ # Graph construction and management │ ├── judge/ # Legal judgment modules │ ├── preprocess/ # Data preprocessing │ ├── prompt/ # Prompt templates │ └── utils/ # Utility functions ├── scripts/ # Data preparation scripts ├── raw_data/ # User-provided source files for preprocessing ├── datas/ # Generated preprocessing outputs ├── run.py # Main evaluation script ├── env.example # Configuration file template └── README.md # Project documentation ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.