SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.05620 · 2023

LAiW: A Chinese Legal Large Language Models Benchmark

arXiv · PDF · Open in the Atlas

Code that ran

11 of 14 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, 1 violated it and 1 has no contract verdict; 8 failures of our instrument; 3 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-22; 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/2310.05620.json · badge: /api/ran/2310.05620.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
dai-shen/laiw canonical (classifier label)
classifier basis: census
11 ran · 3 no recorded run
FunctionStatusWhere it lives
mean Ran
ran, violated the contract we drafted
dai-shen/laiw/src/financial-evaluation/lm_eval/metrics.py
code served (permissive licence) · get_code("0928f497e20fb443")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-04T22:25:48Z). 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 torch

torch.manual_seed(0)

# The function 'mean' takes an array-like object and computes the average
# It uses: sum(arr) and len(arr)
# So arr needs to support sum() and len()

# Create a simple list of numbers
arr = [1.0, 2.0, 3.0, 4.0, 5.0]

ARGS = {
    "arr": arr
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — 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
escaped_split Ran
ran; our contract draft was wrong, not the code
dai-shen/laiw/src/financial-evaluation/lm_eval/utils.py
code served (permissive licence) · get_code("57e732507bad40db")
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 list, 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 re

# The function escaped_split takes text (a string), sep_char (a single character string),
# and maxsplit (an integer). Let's construct valid arguments.

ARGS = {
    "text": "hello\\,world,foo\\,bar,baz",
    "sep_char": ",",
    "maxsplit": -1
}
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 list, ndim 1, dtype family float — a list 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
group Ran
ran; our contract draft was wrong, not the code
dai-shen/laiw/src/financial-evaluation/lm_eval/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from hdong920/griffin, is pointer only (licence: NONE) · get_code("359c35fdcd7a0ee5")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from hdong920/griffin, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

hash_args Ran
ran; our contract draft was wrong, not the code
dai-shen/laiw/src/financial-evaluation/lm_eval/base.py
pointer only (licence: MIT); the stored copy get_code serves, from opengvlab/videochat-r1, is pointer only (licence: NONE) · get_code("ea06eaae4fc1eaf0")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from opengvlab/videochat-r1, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

insert_space Ran
ran; our contract draft was wrong, not the code
dai-shen/laiw/precision/legal_metrics.py
code served (permissive licence) · get_code("0510e8cbb2c5a1e3")
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
import numpy as np

torch.manual_seed(0)

# Analyze the function: insert_space(text)
# - Takes a single parameter: text
# - Expects text to be a string (uses len(), indexing with [i:i+1])
# - If text is falsy, sets it to ' '
# - Iterates through each character and adds a space after each one
# - Returns the result with the trailing space removed

ARGS = {
    'text': 'hello'
}
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 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
mcc Ran
ran, honoured the contract we drafted
dai-shen/laiw/precision/legal_metrics.py
code served (permissive licence) · get_code("1213c8a6b0d1d84a")
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 torch
import numpy as np
from sklearn.metrics import matthews_corrcoef, f1_score, accuracy_score

torch.manual_seed(0)

# The function takes:
# - preds: a list/array of predicted labels
# - answers: a list/array of true labels
# Both are used to create a mapping from label values to indices,
# then converted to indices for matthews_corrcoef calculation

preds = ['cat', 'dog', 'cat', 'bird', 'dog']
answers = ['cat', 'cat', 'dog', 'bird', 'dog']

ARGS = {
    'preds': preds,
    'answers': answers
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch — 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
pop_stddev Ran
ran; our contract draft was wrong, not the code
dai-shen/laiw/src/financial-evaluation/lm_eval/metrics.py
pointer only (licence: MIT); the stored copy get_code serves, from MrGGLS/BlockPruner, is pointer only (licence: NONE) · get_code("518b2201c66c2ad3")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from MrGGLS/BlockPruner, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

process_text Ran
ran; our contract draft was wrong, not the code
dai-shen/laiw/src/tasks/utils.py
code served (permissive licence) · get_code("efc4c3ac590c9737")
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 list, 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

def process_text(entity_string, text):
    entity_list = [(', '.join(val.split(', ')[:-1]), val.split(', ')[-1]) for val in entity_string.split('\n')]
    text_words = text.split()
    labels = ['O'] * len(text_words)
    text_lower = text
    word_indices = [0]
    for word in text_words[:-1]:
        word_indices.append(word_indices[-1] + len(word) + 1)
    print(entity_list)
    for entity, entity_type in entity_list:
        entity_words = entity.split()
        entity_lower = entity
        start = 0
        while True:
            start = text_lower.find(entity_lower, start)
            if not entity or start == -1:
                break
            end = start + len(entity) - 1
            try:
                start_word = next((i for i, ind in enumerate(word_indices) if ind >= start))
                end_word = next((i for i, ind in enumerate(word_indices) if ind > end))
                labels[start_word] = 'B-' + entity_type
                for i in range(start_word + 1, end_word):
                    labels[i] = 'I-' + entity_type
            except Exception:
                pass
            start = end + 1
    return labels

# Setup code to construct valid arguments
entity_string = "John Smith, PERSON\nNew York City, LOCATION\napple, ORG"
text = "John Smith works in New York City for apple company"

ARGS = {
    "entity_string": entity_string,
    "text": text
}
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 list, ndim 1, dtype family float — a list 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
sample_stddev Ran
ran; our contract draft was wrong, not the code
dai-shen/laiw/src/financial-evaluation/lm_eval/metrics.py
code served (permissive licence) · get_code("d40f0123e8a8f5c0")
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) 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 math

def mean(arr):
    return sum(arr) / len(arr)

def sample_stddev(arr):
    mu = mean(arr)
    return math.sqrt(sum([(x - mu) ** 2 for x in arr]) / (len(arr) - 1))

# Setup code
arr = [1.5, 2.3, 3.1, 4.2, 5.0]

ARGS = {
    "arr": arr
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
simple_parse_args_string Ran
ran; our contract draft was wrong, not the code
dai-shen/laiw/src/financial-evaluation/lm_eval/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from hdong920/griffin, is pointer only (licence: NONE) · get_code("cd999ad59caf84a7")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from hdong920/griffin, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

single_chat Ran
ran on a synthesized input
dai-shen/laiw/src/chatlm.py
code served (permissive licence) · get_code("df801139cecd0329")
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 coroutine. 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 asyncio
from unittest.mock import AsyncMock, MagicMock
import json

# Create a mock client that returns a valid response
mock_client = AsyncMock()

# Create a mock response object
mock_response = MagicMock()
mock_response.text = "Mock response text"
mock_response.json.return_value = {
    'choices': [
        {
            'message': {
                'content': 'This is a test response from the mock API.'
            }
        }
    ]
}

# Set the client's post method to return the mock response
mock_client.post = AsyncMock(return_value=mock_response)

# Define kwargs for the chat function
kwargs = {
    'model': 'gpt-3.5-turbo',
    'messages': [
        {'role': 'user', 'content': 'Hello, how are you?'}
    ]
}

ARGS = {
    'client': mock_client,
    'kwargs': kwargs
}
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 coroutine — a coroutine output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a coroutine 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 Not yet run
unverified (harvested, no recorded run)
dai-shen/laiw/src/interface.py
code served (permissive licence) · get_code("5a6e0b41ccbd8a98")
How it ran

no invocation recorded.

generate_prompt Not yet run
unverified (harvested, no recorded run)
dai-shen/laiw/src/interface.py
code served (permissive licence) · get_code("d8c48497dd9cc819")
How it ran

no invocation recorded.

make_table Not yet run
unverified (harvested, no recorded run)
dai-shen/laiw/src/evaluator.py
pointer only (licence: MIT); the stored copy get_code serves, from princeton-nlp/QuRating, is pointer only (licence: NONE) · get_code("9d95c14130837ee4")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from princeton-nlp/QuRating, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 10 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 0 the same month, 10 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
hash_args 44 other papers
5 dated earlier, 38 later, 1 undated
2005.14165 (2020-05)
Language Models are Few-Shot Learners
2110.04374 (2021-10)
A Few More Examples May Be Worth Billions of Parameters
2303.17003 (2023-03)
Evaluating GPT-3.5 and GPT-4 Models on Brazilian University Admission Exams
and 41 more not named here
mean 12 other papers
6 dated earlier, 6 later
2110.04374 (2021-10)
A Few More Examples May Be Worth Billions of Parameters
2212.11702 (2022-12)
Robust Meta-Representation Learning via Global Label Inference and Classification
2303.17003 (2023-03)
Evaluating GPT-3.5 and GPT-4 Models on Brazilian University Admission Exams
and 9 more not named here
escaped_split 9 other papers
3 dated earlier, 6 later
2005.14165 (2020-05)
Language Models are Few-Shot Learners
2305.14493 (2023-05)
Do prompt positions really matter?
2307.16039 (2023-07)
Okapi: Instruction-tuned Large Language Models in Multiple Languages with Reinforcement Learning from Human Feedback
and 6 more not named here
make_table 9 other papers
3 dated earlier, 6 later
2303.17003 (2023-03)
Evaluating GPT-3.5 and GPT-4 Models on Brazilian University Admission Exams
2305.14493 (2023-05)
Do prompt positions really matter?
2307.16039 (2023-07)
Okapi: Instruction-tuned Large Language Models in Multiple Languages with Reinforcement Learning from Human Feedback
and 6 more not named here
pop_stddev 9 other papers
3 dated earlier, 6 later
2303.17003 (2023-03)
Evaluating GPT-3.5 and GPT-4 Models on Brazilian University Admission Exams
2305.14493 (2023-05)
Do prompt positions really matter?
2307.16039 (2023-07)
Okapi: Instruction-tuned Large Language Models in Multiple Languages with Reinforcement Learning from Human Feedback
and 6 more not named here
sample_stddev 9 other papers
4 dated earlier, 5 later
2303.17003 (2023-03)
Evaluating GPT-3.5 and GPT-4 Models on Brazilian University Admission Exams
2305.14493 (2023-05)
Do prompt positions really matter?
2306.09200 (2023-06)
ChessGPT: Bridging Policy Learning and Language Modeling
and 6 more not named here
group 8 other papers
4 dated earlier, 4 later
2110.04374 (2021-10)
A Few More Examples May Be Worth Billions of Parameters
2303.17003 (2023-03)
Evaluating GPT-3.5 and GPT-4 Models on Brazilian University Admission Exams
2305.14493 (2023-05)
Do prompt positions really matter?
and 5 more not named here
simple_parse_args_string 5 other papers
2 dated earlier, 3 later
2305.14493 (2023-05)
Do prompt positions really matter?
2307.16039 (2023-07)
Okapi: Instruction-tuned Large Language Models in Multiple Languages with Reinforcement Learning from Human Feedback
2402.09398 (2024-02)
Get More with LESS: Synthesizing Recurrence with KV Cache Compression for Efficient LLM Inference
and 2 more not named here
evaluate 1 other paper
1 later
2402.12659 (2024-02)
FinBen: A Holistic Financial Benchmark for Large Language Models
generate_prompt 1 other paper
1 later
2402.12659 (2024-02)
FinBen: A Holistic Financial 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-22.

Repositories linked to this paper

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

Abstract

General and legal domain LLMs have demonstrated strong performance in various tasks of LegalAI. However, the current evaluations of these LLMs in LegalAI are defined by the experts of computer science, lacking consistency with the logic of legal practice, making it difficult to judge their practical capabilities. To address this challenge, we are the first to build the Chinese legal LLMs benchmark LAiW, based on the logic of legal practice. To align with the thinking process of legal experts and legal practice (syllogism), we divide the legal capabilities of LLMs from easy to difficult into three levels: basic information retrieval, legal foundation inference, and complex legal application. Each level contains multiple tasks to ensure a comprehensive evaluation. Through automated evaluation of current general and legal domain LLMs on our benchmark, we indicate that these LLMs may not align with the logic of legal practice. LLMs seem to be able to directly acquire complex legal application capabilities but perform poorly in some basic tasks, which may pose obstacles to their practical application and acceptance by legal experts. To further confirm the complex legal application capabilities of current LLMs in legal application scenarios, we also incorporate human evaluation with legal experts. The results indicate that while LLMs may demonstrate strong performance, they still require reinforcement of legal logic.

For agents

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

get_harvested_code_for_paper("2310.05620")
get_code_for_paper("2310.05620")
have("2310.05620")

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

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

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

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

Connect an agent — have() is free.