Syntax hacking: Researchers discover sentence structure can bypass AI safety rules

2 December 2025

Upgrade to Custom Cursor Pro for exclusive features!

New research offers clues about why some prompt injection attacks may succeed.

Researchers from MIT, Northeastern University, and Meta recently released a paper suggesting that large language models (LLMs) similar to those that power ChatGPT may sometimes prioritize sentence structure over meaning when answering questions. The findings reveal a weakness in how these models process instructions that may shed light on why some prompt injection or jailbreaking approaches work, though the researchers caution their analysis of some production models remains speculative since training data details of prominent commercial AI models are not publicly available.

The team, led by Chantal Shaib and Vinith M. Suriyakumar, tested this by asking models questions with preserved grammatical patterns but nonsensical words. For example, when prompted with “Quickly sit Paris clouded?” (mimicking the structure of “Where is Paris located?”), models still answered “France.”

This suggests models absorb both meaning and syntactic patterns, but can overrely on structural shortcuts when they strongly correlate with specific domains in training data, which sometimes allows patterns to override semantic understanding in edge cases. The team plans to present these findings at NeurIPS later this month.

As a refresher, syntax describes sentence structure—how words are arranged grammatically and what parts of speech they use. Semantics describes the actual meaning those words convey, which can vary even when the grammatical structure stays the same.

Semantics depends heavily on context, and navigating context is what makes LLMs work. The process of turning an input, your prompt, into an output, an LLM answer, involves a complex chain of pattern matching against encoded training data.

To investigate when and how this pattern-matching can go wrong, the researchers designed a controlled experiment. They created a synthetic dataset by designing prompts in which each subject area had a unique grammatical template based on part-of-speech patterns. For instance, geography questions followed one structural pattern while questions about creative works followed another. They then trained Allen AI’s Olmo models on this data and tested whether the models could distinguish between syntax and semantics.

Discover our latest cursor collections and enhance your browsing today!
Advertisement: Try Custom Cursor Pro now!

Our Products

Catch the Cat - Reflex Challenge

Catch the Cat - Reflex Challenge

Drive repeat sessions with Catch the Cat - a fast-paced browser game that tests reflexes and strategic thinking in bite-sized play periods.

View Product
Cursor Helper - Custom Cursors

Cursor Helper - Custom Cursors

Maximize productivity with Cursor Helper: a refined extension that not only customizes your pointer’s look but streamlines your daily workflow with intuitive options.

View Product
Custom Cursor App - Custom Cursor

Custom Cursor App - Custom Cursor

Discover a versatile cursor toolkit - Custom Cursor App delivers an expansive library of high-resolution pointers that blend flawless aesthetics with lightning-fast performance.

View Product
Minesweeper for Chrome - Logic Puzzle

Minesweeper for Chrome - Logic Puzzle

Revitalize a classic with Minesweeper for Chrome - an engaging logic puzzle that enhances site interaction and encourages multiple playthroughs.

View Product
Custom Cursor - Mouse Cursor

Custom Cursor - Mouse Cursor

Rediscover the classic pointer - Mouse Cursor redefines simplicity with a selection of minimalist, high-contrast cursors optimized for every task.

View Product
BridgeMaster - Stick Hero Arcade Game

BridgeMaster - Stick Hero Arcade Game

Extend session lengths with BridgeMaster - a physics-driven arcade game where precision and timing unlock new levels of user engagement.

View Product
Cursor Space for Google Chrome

Cursor Space for Google Chrome

Transform your browser into a cosmic playground - Cursor Space introduces galaxy-inspired pointers that add immersive flair without sacrificing speed or usability.

View Product
Cursor Cat - Animated Pointer Companion

Cursor Cat - Animated Pointer Companion

Delight users with Cursor Cat - a playful Chrome extension that adds a charming feline sidekick to every cursor move, boosting UX and shareability.

View Product
PiggyBank Money Clicker - Idle Cash Game

PiggyBank Money Clicker - Idle Cash Game

Boost engagement with PiggyBank Money Clicker - a browser idle game where every click yields virtual cash, driving session length and repeat visits.

View Product
Custom Cursor Trail - Custom Cursor Helper

Custom Cursor Trail - Custom Cursor Helper

Leave a lasting impression - Cursor Trail paints your path in luminous strokes, marrying dynamic motion with elegant design for every movement.

View Product
Custom Cursor Trail - Interactive Effects

Custom Cursor Trail - Interactive Effects

Stand out with Custom Cursor Trail - a Chrome extension that traces your pointer in vivid effects to captivate visitors and boost brand recall.

View Product
Custom Cursor Pro - Custom Cursor

Custom Cursor Pro - Custom Cursor

Elevate your Chrome experience with Custom Cursor Pro: a premium suite of handcrafted cursors engineered for performance, style, and seamless integration.

View Product
Pawsome Browser Kitties - Cursor Animation

Pawsome Browser Kitties - Cursor Animation

Increase dwell time with Pawsome Kitties - animated kitten avatars that follow your pointer, enhancing site stickiness and user delight.

View Product
Money Rain - Visual Currency Extension

Money Rain - Visual Currency Extension

Capture attention with Money Rain - a Chrome extension that showers your screen in dynamic money graphics, perfect for viral sharing and brand visibility.

View Product
Cursor Trails - Custom Cursor Trails

Cursor Trails - Custom Cursor Trails

Enrich each click with graceful motion - Cursor Trails offers a refined collection of animated effects to elevate both style and usability.

View Product
Custom Cursor - Texture Cursors

Custom Cursor - Texture Cursors

Experience tactile depth in the digital realm - Texture Cursors offers a curated set of lifelike pointer textures, elevating both clarity and creativity.

View Product
Custom Cursor Changer

Custom Cursor Changer

Inject personality into your pointer - Custom Cursor Changer lets you switch between dozens of vibrant designs in a single click, boosting engagement and fun.

View Product
Cookie Clicker - Idle Browser Simulation

Cookie Clicker - Idle Browser Simulation

Engage millions in addictive baking fun - Cookie Clicker ramps up user retention with layered upgrades and strategic progression in an idle format.

View Product