Syntactic Priming in Few-Shot Learning: How Demonstration Structure Shapes LLM Performance

· Source: Paper Index on ACL Anthology · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Natural Language Processing · Depth: Expert, quick

Summary

A study investigated syntactic priming in large language models' (LLMs) few-shot learning, examining how demonstration example structure influences outputs. Researchers tested four model families (Llama, Mistral, Qwen, Gemma) across four syntactic constructions: passive voice, cleft sentences, dative alternation, and particle placement. Results showed robust syntactic priming effects, with models 1.3x to 6.4x more likely to produce constructions matching demonstration syntax, depending on the type. Priming strength positively correlated with model size (r = 0.85, p = 0.068), intensifying from 7B to 14B parameter models. The study found priming to be construction-specific, not general stylistic preference, and persistent across multiple intervening sentences. Syntactic structure in demonstrations influenced output style across sentence completion, paraphrase generation, and story continuation tasks, even when a different syntactic form was expected. A new benchmark, SyntaxPrime-ICL, was released.

Key takeaway

For prompt engineers designing few-shot examples, understand that the syntactic structure of your demonstrations profoundly influences LLM output. Your chosen syntax can bias models to produce specific constructions 1.3x to 6.4x more often, potentially overriding the desired output format for a given task. You should carefully review and control the syntactic patterns in your prompts, especially for larger models, to ensure outputs align with task requirements rather than unintended priming effects.

Key insights

LLMs exhibit strong syntactic priming from few-shot demonstrations, influencing output structure beyond surface-level matching.

Principles

Method

Systematic experiments across four LLM families (Llama, Mistral, Qwen, Gemma) using four syntactic constructions to measure output matching demonstration syntax.

In practice

Topics

Best for: AI Engineer, Machine Learning Engineer, Research Scientist, AI Scientist, NLP Engineer, Prompt Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Paper Index on ACL Anthology.