atlas

Research map / Large language models / Instruction and fine-tuning

StringLLM: Understanding the String Processing Capability of Large Language Models

ICLR 2025 · Large language models › Instruction and fine-tuning · approach: Calibration and knowledge in LLM tuning · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Introduces StringLLM, a code-driven pipeline that builds StringBench (1,511 string-processing tasks across multilingual, hash, and random-string datasets), benchmarks LLMs with raw, CoT, and PoT prompting, and shows LLMs lag humans and that PoT-style SFT on Llama-3.1-8B, Gemma-2-9b, and Mistral-7B greatly improves accuracy.

Problem

LLMs struggle with basic string processing (indexing, searching, counting, manipulation), yet this capability has only been studied through isolated case studies without comprehensive benchmarks, root-cause analysis, or effective remedies.

Approach

Use GPT-4o only for code-level operations (composing atomic Python string functions into composite tasks, summarizing code into question templates) and compute ground-truth answers by executing Python, yielding a verifiable benchmark; then fine-tune open LLMs with LoRA on PoT-style solutions to boost string processing.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Fine-tune with StringBench and general-purpose and programming datasetsGemma-2-9b, Mistral-7B-v0.3, and Llama-3.1-8B · StringBench Multilingual, Hash, and Random Stringaccuracy: + 38.80; + 56.51; + 42.87Helped
Use PoT instead of raw instructions10 evaluated LLMs · StringBench averageaccuracy: 22.09 and 29.54Helped
Use PoT instead of CoT or raw instructionsDeepSeek-Chat · StringBench averageaccuracy: 8.39 -> 5.76; 3.22 -> 5.76Hurt
Insert white spaces between all characters (ablation)Gemma-2-9b, Mistral-7B-v0.3, and Llama-3.1-8B · StringBenchaccuracyMixed
Encode each character as a single token ID (ablation)Gemma-2-9b, Mistral-7B-v0.3, and Llama-3.1-8B · StringBenchaccuracyHurt
Include general-purpose datasets during fine-tuning (ablation)Gemma-2-9b, Mistral-7B-v0.3, and Llama-3.1-8B · MMLU, Hellaswag, and ARCaverage performance: - 1.49 vs - 0.87; - 1.60 vs - 1.35; - 0.46 vs + 0.51Helped
Fine-tune on StringBench with general-purpose and programming datasetsGemma-2-9b, Mistral-7B-v0.3, and Llama-3.1-8B · MMLU, Hellaswag, and ARCaverage performance: - 0.87; - 1.35; + 0.51Mixed
Fine-tune on StringBench with general-purpose and programming datasetsGemma-2-9b, Mistral-7B-v0.3, and Llama-3.1-8B · HumanEval, HumanEval+, MBPP, and MBPP+average performance: - 0.78; - 0.68; - 1.05Hurt

Surprising findings

Limitations

Experimental setup

Datasets: Flores-200 Alpaca-GPT-4 Dolly-15k Code Alpaca OpenCoder StringBench

Benchmarks: StringBench MMLU Hellaswag ARC HumanEval HumanEval+ MBPP MBPP+

Metrics: accuracy acc-norm

Baselines: GPT-4o GPT-4-Turbo GPT-3.5 DeepSeek-Coder DeepSeek-Chat Gemma-2-9b Mistral-7B-v0.3 Llama-3.1-8B

Builds on: chain-of-thought program of thought LoRA LlamaFactory

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy