Prompt Design at Scale: How Format, Instruction Count, and Context Length Shape Instruction Adherence and Hallucination in Large Language Models

· Source: Takara TLDR - Daily AI Papers · Field: Technology & Digital — Artificial Intelligence & Machine Learning · Depth: Expert, medium

Summary

A study on prompt design for Large Language Models (LLMs) investigated how instruction format, count, and context length affect instruction adherence and hallucination. Using a synthetic corpus, "Book of Veyra," across five models, two controlled experiments were conducted. Experiment 1, involving 960 calls per model, found that instruction-following collapsed to a zero perfect-response rate by 80 rules, regardless of format or placement (system-prompt vs. user-turn). No consistent markdown advantage was observed; one 35B model even preferred plain text. Experiment 2, with 5,520 calls per model, showed recall accuracy remained high through 64-128k tokens before sharp, format-dependent degradation, with one model's accuracy spread reaching 48 points at 128k tokens. Fabrication was absent (0/5,760 probes), and sycophancy was negligible (<=8.3%), but refusal to answer sharply increased to 79-90% near context limits. Token overhead of +22% to +37% for non-plain text formats also influenced performance. The researchers released the VeyraBench harness, corpus generator, and raw results.

Key takeaway

For Prompt Engineers designing complex LLM applications, you must critically evaluate instruction count and context length. Your instruction sets should ideally remain below 80 rules to prevent complete adherence failure. Furthermore, for tasks requiring high recall, keep your context windows under 64k-128k tokens to avoid sharp accuracy degradation and increased refusal rates. Do not assume markdown offers a universal advantage; test plain text, as it can perform better and reduce token overhead for your specific model.

Key insights

LLM instruction adherence and recall degrade significantly with increasing instruction count and context length, with format effects being model-specific.

Principles

Method

Two controlled experiments crossed instruction format, count, and context length on a synthetic corpus ("Book of Veyra") across five LLMs, measuring adherence, recall, and hallucination.

In practice

Topics

Code references

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

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Takara TLDR - Daily AI Papers.