Papers › SPRIG: Improving Large Language Model Performance by System Prompt Optimization

SPRIG: Improving Large Language Model Performance by System Prompt Optimization

18 Oct 2024arXiv:2410.14826archive 2025-07-28

Lechen Zhang, Tolga Ergen, Lajanugen Logeswaran, Moontae Lee, David Jurgens

Large Language Models (LLMs) have shown impressive capabilities in many scenarios, but their performance depends, in part, on the choice of prompt. Past research has focused on optimizing prompts specific to a task. However, much less attention has been given to optimizing the general instructions included in a prompt, known as a system prompt. To address this gap, we propose SPRIG, an edit-based genetic algorithm that iteratively constructs prompts from prespecified components to maximize the model's performance in general scenarios. We evaluate the performance of system prompts on a collection of 47 different types of tasks to ensure generalizability. Our study finds that a single optimized system prompt performs on par with task prompts optimized for each individual task. Moreover, combining system and task-level optimizations leads to further improvement, which showcases their complementary nature. Experiments also reveal that the optimized system prompts generalize effectively across model families, parameter sizes, and languages. This study provides insights into the role of system-level instructions in maximizing LLM potential.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2410.14826")

Code

Syntology Ran 14 of 19 code samples harvested from 1 repository linked to this paper; 5 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 13 ran with no contract checked.

By repository: official repository: 19 samples from 1 repository, 14 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

orange0629/prompting officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

19 samples harvested; 14 ran; 0 honoured the contract we drafted; 5 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
13ran
5unverified

Licence: 19 of the 19 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from orange0629/prompting. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

create_save_dir orange0629/prompting/exp3/categorization/language-matters/count_reasoning_types.py official repository ran no licence file found · pointer only · c845e58e7ef3ba34 · report
extract_path_components orange0629/prompting/exp3/categorization/language-matters/classify_reasoning_types_batch.py official repository ran no licence file found · pointer only · 290efba7e1ecb8c2 · report
format_steps orange0629/prompting/exp3/segmentation/segmentation.py official repository ran no licence file found · pointer only · 8452ea695318c238 · report
get_file_save_name orange0629/prompting/exp3/categorization/language-matters/classify_reasoning_types_batch.py official repository ran no licence file found · pointer only · 9a700f6f68811df6 · report
get_file_save_name orange0629/prompting/exp3/categorization/language-matters/count_reasoning_types_batch.py official repository ran no licence file found · pointer only · 069bc97ca5d9dc52 · report
get_gcs_download_dir orange0629/prompting/exp3/categorization/language-matters/count_reasoning_types_batch.py official repository ran no licence file found · pointer only · 97568c4ea3aefbe7 · report
get_gcs_upload_path orange0629/prompting/exp3/categorization/language-matters/classify_reasoning_types_batch.py official repository ran no licence file found · pointer only · 0561a2abdc6ecd47 · report
get_gcs_upload_path orange0629/prompting/exp3/categorization/language-matters/count_reasoning_types_batch.py official repository ran no licence file found · pointer only · 3827108f9c3935dd · report
inference_and_save orange0629/prompting/exp3/categorization/language-matters/count_reasoning_types.py official repository ran no licence file found · pointer only · 1702eb3291926377 · report
parse_sectioned_prompt orange0629/prompting/related_work/protegi/utils.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · 37e7baf06cc5b2f0 · report
parse_steps orange0629/prompting/exp3/categorization/language-matters/get_behavior_result.py official repository ran fingerprinted no licence file found · pointer only · 6886e74e5643103d · report
predict_on_example orange0629/prompting/related_work/protegi/scorers.py official repository ran no licence file found · pointer only · d71640372878473e · report
process_example orange0629/prompting/related_work/protegi/tasks.py official repository ran no licence file found · pointer only · aab213b0895dc732 · report
strip_all_lines orange0629/prompting/exp3/categorization/language-matters/count_reasoning_types.py official repository ran fingerprinted no licence file found · pointer only · 7675dd1e070692e3 · report
generate_latex_table orange0629/prompting/exp3/categorization/language-matters/get_table_result.py official repository unverified no licence file found · pointer only · a1fd5f6c9eed572c · report
normalize_step_types orange0629/prompting/exp3/categorization/language-matters/get_behavior_result.py official repository unverified no licence file found · pointer only · 813f1b42c556fc3b · report
predict_batch_step_splits orange0629/prompting/exp3/segmentation/segmentation.py official repository unverified no licence file found · pointer only · 90e80d909d64d09f · report
process_example_vllm orange0629/prompting/related_work/protegi/tasks.py official repository unverified no licence file found · pointer only · 19209ae07d7fceae · report
process_steps_with_normalization orange0629/prompting/exp3/categorization/language-matters/get_behavior_result.py official repository unverified no licence file found · pointer only · 759a3fe338de2d4b · report

Tasks

Language ModelingLanguage ModellingLarge Language Model

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

AttentionSoftmax

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections