SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2309.11325 · 2023

DISC-LawLLM: Fine-tuning Large Language Models for Intelligent Legal Services

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 1 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2309.11325.json · badge: /api/ran/2309.11325.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
fudandisc/disc-lawllm canonical (classifier label)
classifier basis: census
3 ran · 1 no recorded run
fudandisc/disc-finllm community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
FunctionStatusWhere it lives
colored Ran
ran; our contract draft was wrong, not the code
fudandisc/disc-lawllm/eval/src/utils.py
code served (permissive licence) · get_code("44cb610f58de9c76")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function `colored` takes two parameters:
# 1. obj: any object that will be converted to string
# 2. color: a string specifying the color

ARGS = {
    'obj': 'Hello World',
    'color': 'blue'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
evaluate_until_completed Ran
ran, honoured the contract we drafted
fudandisc/disc-lawllm/eval/src/utils.py
code served (permissive licence) · get_code("1b5441bd329b5498")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import time

def colored(obj, color):
    if color == 'black':
        return f'\x1b[30m{obj}\x1b[39m'
    elif color == 'red':
        return f'\x1b[31m{obj}\x1b[39m'
    elif color == 'green':
        return f'\x1b[32m{obj}\x1b[39m'
    elif color == 'yellow':
        return f'\x1b[33m{obj}\x1b[39m'
    elif color == 'blue':
        return f'\x1b[34m{obj}\x1b[39m'
    elif color == 'magenta':
        return f'\x1b[35m{obj}\x1b[39m'
    elif color == 'cyan':
        return f'\x1b[36m{obj}\x1b[39m'
    elif color == 'white':
        return f'\x1b[37m{obj}\x1b[39m'

def evaluate_until_completed(evaluator, max_iter):
    for it in range(max_iter):
        completed = evaluator.evaluate()
        if completed:
            break
        if it != max_iter - 1:
            print(colored('Sleeping for 30s', 'magenta'), end=' ', flush=True)
            for _ in range(30):
                time.sleep(1)
                print(colored('.', 'magenta'), end='', flush=True)
            print()
    if not completed:
        raise ValueError
    return evaluator.load_avg_score()


class MockEvaluator:
    def __init__(self, complete_on_iteration=0):
        self.iteration_count = 0
        self.complete_on_iteration = complete_on_iteration
        self.avg_score = 0.85
    
    def evaluate(self):
        completed = self.iteration_count >= self.complete_on_iteration
        self.iteration_count += 1
        return completed
    
    def load_avg_score(self):
        return self.avg_score


evaluator = MockEvaluator(complete_on_iteration=0)
max_iter = 3

ARGS = {
    'evaluator': evaluator,
    'max_iter': max_iter,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
extract_questions_and_text Ran
ran; our contract draft was wrong, not the code
fudandisc/disc-finllm/eval/evaluator/utils.py
code served (permissive licence) · get_code("30aecd96194fddce")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# The function extract_questions_and_text takes a string input and splits it by Chinese question marks
# It returns a tuple of (first_content, second_content)

# Create a valid input string containing Chinese question marks
input_string = "What is your name?How are you?I'm fine"

ARGS = {
    "input_string": input_string
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_paths Ran
ran; our contract draft was wrong, not the code
fudandisc/disc-lawllm/eval/src/utils.py
code served (permissive licence) · get_code("9358925191a9836e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os

ARGS = {
    'basedir': '/tmp/test_base',
    'prefix': 'test',
    'suffix': 'jsonl',
    'dataset_name': 'my_dataset',
    'model_name': 'my_model',
    'unique_dir': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_json Ran
ran; our contract draft was wrong, not the code
fudandisc/disc-finllm/eval/evaluator/utils.py
code served (permissive licence) · get_code("f97998403d38cffc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import tempfile
import os

# Create a temporary JSON file with valid test data
temp_dir = tempfile.mkdtemp()
json_path = os.path.join(temp_dir, "test_data.json")

test_data = {
    "key1": "value1",
    "key2": [1, 2, 3],
    "key3": {"nested": "object"}
}

with open(json_path, 'w', encoding='utf-8') as f:
    json.dump(test_data, f)

ARGS = {
    "path": json_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_model Not yet run
unverified (harvested, no recorded run)
fudandisc/disc-lawllm/eval/src/models.py
code served (permissive licence) · get_code("3e00a40a3b4a64e5")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 0 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
extract_questions_and_text 1 other paper
1 dated earlier
2308.09975 (2023-08)
FinEval: A Chinese Financial Domain Knowledge Evaluation Benchmark for Large Language Models
load_json 1 other paper
1 dated earlier
2308.09975 (2023-08)
FinEval: A Chinese Financial Domain Knowledge Evaluation Benchmark for Large Language Models

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

We propose DISC-LawLLM, an intelligent legal system utilizing large language models (LLMs) to provide a wide range of legal services. We adopt legal syllogism prompting strategies to construct supervised fine-tuning datasets in the Chinese Judicial domain and fine-tune LLMs with legal reasoning capability. We augment LLMs with a retrieval module to enhance models' ability to access and utilize external legal knowledge. A comprehensive legal benchmark, DISC-Law-Eval, is presented to evaluate intelligent legal systems from both objective and subjective dimensions. Quantitative and qualitative results on DISC-Law-Eval demonstrate the effectiveness of our system in serving various users across diverse legal scenarios. The detailed resources are available at https://github.com/FudanDISC/DISC-LawLLM.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2309.11325")
get_code_for_paper("2309.11325")
have("2309.11325")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2309.11325.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2309.11325.svg)](https://syntology.ai/paper/2309.11325)

Connect an agent — have() is free.