[Experiments & Analysis]
This repository contains the code for the paper "Comparison and Analysis of Value Linking in Text-to-SQL systems [Experiments & Analysis]".
Here, you will find everything needed to reproduce the experiments, analysis, and benchmarks presented in the paper.
wget https://anonymous.4open.science/api/repo/experimental-analysis-of-value-linking-36B3/zip -O experimental-analysis-of-value-linking.zip
unzip experimental-analysis-of-value-linking.zip -d experimental-analysis-of-value-linking
cd experimental-analysis-of-value-linking/
conda env create -f environment.yml
conda activate value_linking
pip install -e .
hf download ValueLinking/value_linking_assets --repo-type dataset --local-dir ./
⚠️ Note: The HuggingFace account used to upload this data was created solely for the purpose of this paper and is completely anonymized. This command downloads the databases and all precomputed indexes required for running the experiments. The download may take some time. If you prefer, you can instead download only the database and compute the indexes manually using the provided scripts.
To create our benchmark:
1. Data Exploration
We used utils/data_explorer.py to perform data exploration that generated LLM-based discrepancies.
assets/data_explorationassets/data_exploration_human2. Benchmark Generation
Using scripts/run_alter_execute_verify.py, we created the final benchmark:
assets/all_benchmarks_humanassets/all_benchmarks_human/all_dump_good.jsonTo evaluate the Value Linking component, first run the indexing:
python scripts/run_indexing.py
⏱ This may take some time, but you can skip it if you have downloaded the full assets from HuggingFace.
wandb_entity inside scripts/run_retrieval.py to log results to Weights & Biases:python scripts/run_retrieval.py
python scripts/run_retrieval_k.py
Standard Systems:
Preprocessing and running Text-to-SQL experiments for systems like OpenSearch-SQL, OmniSQL, and CHESS follow the original paper implementations. Replace the dev file with our dev files (assets/all_benchmarks_human/all_dump_good.json) as needed.
LLM Baselines: To reproduce the results for frontier LLMs (Claude Sonnet 4.5, GPT-5.2) which lack explicit value linking modules:
Claude Sonnet 4.5 (via AWS Bedrock):
Update scripts/run_bedrock.py with your AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and REGION_NAME.
python scripts/run_bedrock.py --model_id "eu.anthropic.claude-sonnet-4-5-20250929-v1:0"
GPT-5.2 (via OpenRouter):
Update scripts/run_open_router.py with your OPENROUTER_API_KEY.
python scripts/run_open_router.py
We modified the original systems to exclude value linking, and included their code in this repository. Simply run the original system scripts, replacing the dev file each time with:
assets/augmented_dump_p*.json
where * corresponds to different precision values. All necessary preprocessing files are included in assets.
To evaluate the trade-offs between different combinations of detection (e.g., NER, LLM, n-grams) and mapping methods (e.g., Dense Index, MinHashLSH):
python scripts/run_value_reference_detection.py
To validate findings on the independent OpenAIRE Research Graph hold-out set:
Indexing:
Update scripts/run_openaire_indexing_retrievers.py with your PostgreSQL connection details (DB_CONFIG).
python scripts/run_openaire_indexing_retrievers.py
Retrieval Evaluation:
Update scripts/run_openaire_retrieval_retrievers.py with your PostgreSQL connection details.
python scripts/run_openaire_retrieval_retrievers.py
To evaluate indexing time, storage size, and query latency across increasing database sizes (10k to 50M rows) using the OpenAIRE dataset:
scripts/run_openaire_indexing_scalability.py with your DB_CONFIG.python scripts/run_openaire_indexing_scalability.py
90 followers · starred Jun 2026
[Experiments & Analysis]
This repository contains the code for the paper "Comparison and Analysis of Value Linking in Text-to-SQL systems [Experiments & Analysis]".
Here, you will find everything needed to reproduce the experiments, analysis, and benchmarks presented in the paper.
wget https://anonymous.4open.science/api/repo/experimental-analysis-of-value-linking-36B3/zip -O experimental-analysis-of-value-linking.zip
unzip experimental-analysis-of-value-linking.zip -d experimental-analysis-of-value-linking
cd experimental-analysis-of-value-linking/
conda env create -f environment.yml
conda activate value_linking
pip install -e .
hf download ValueLinking/value_linking_assets --repo-type dataset --local-dir ./
⚠️ Note: The HuggingFace account used to upload this data was created solely for the purpose of this paper and is completely anonymized. This command downloads the databases and all precomputed indexes required for running the experiments. The download may take some time. If you prefer, you can instead download only the database and compute the indexes manually using the provided scripts.
To create our benchmark:
1. Data Exploration
We used utils/data_explorer.py to perform data exploration that generated LLM-based discrepancies.
assets/data_explorationassets/data_exploration_human2. Benchmark Generation
Using scripts/run_alter_execute_verify.py, we created the final benchmark:
assets/all_benchmarks_humanassets/all_benchmarks_human/all_dump_good.jsonTo evaluate the Value Linking component, first run the indexing:
python scripts/run_indexing.py
⏱ This may take some time, but you can skip it if you have downloaded the full assets from HuggingFace.
wandb_entity inside scripts/run_retrieval.py to log results to Weights & Biases:python scripts/run_retrieval.py
python scripts/run_retrieval_k.py
Standard Systems:
Preprocessing and running Text-to-SQL experiments for systems like OpenSearch-SQL, OmniSQL, and CHESS follow the original paper implementations. Replace the dev file with our dev files (assets/all_benchmarks_human/all_dump_good.json) as needed.
LLM Baselines: To reproduce the results for frontier LLMs (Claude Sonnet 4.5, GPT-5.2) which lack explicit value linking modules:
Claude Sonnet 4.5 (via AWS Bedrock):
Update scripts/run_bedrock.py with your AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and REGION_NAME.
python scripts/run_bedrock.py --model_id "eu.anthropic.claude-sonnet-4-5-20250929-v1:0"
GPT-5.2 (via OpenRouter):
Update scripts/run_open_router.py with your OPENROUTER_API_KEY.
python scripts/run_open_router.py
We modified the original systems to exclude value linking, and included their code in this repository. Simply run the original system scripts, replacing the dev file each time with:
assets/augmented_dump_p*.json
where * corresponds to different precision values. All necessary preprocessing files are included in assets.
To evaluate the trade-offs between different combinations of detection (e.g., NER, LLM, n-grams) and mapping methods (e.g., Dense Index, MinHashLSH):
python scripts/run_value_reference_detection.py
To validate findings on the independent OpenAIRE Research Graph hold-out set:
Indexing:
Update scripts/run_openaire_indexing_retrievers.py with your PostgreSQL connection details (DB_CONFIG).
python scripts/run_openaire_indexing_retrievers.py
Retrieval Evaluation:
Update scripts/run_openaire_retrieval_retrievers.py with your PostgreSQL connection details.
python scripts/run_openaire_retrieval_retrievers.py
To evaluate indexing time, storage size, and query latency across increasing database sizes (10k to 50M rows) using the OpenAIRE dataset:
scripts/run_openaire_indexing_scalability.py with your DB_CONFIG.python scripts/run_openaire_indexing_scalability.py
90 followers · starred Jun 2026