Home / Companies / PromptLayer / Blog / Post Details
Content Deep Dive

LLM Idioms

Blog post from PromptLayer

Post Details
Company
Date Published
Author
Jared Zoneraich
Word Count
781
Language
English
Hacker News Points
-
Summary

An LLM idiom refers to the implicit patterns or formats that language models (LLMs) naturally understand due to their training, such as JSON, XML, Markdown, or chat formats. These idioms allow models to process input more efficiently by leveraging familiar structures, making them valuable tools in prompt engineering. The use of these idioms can influence the assumptions and biases in a model's response, as they guide the model's "thinking" paths. However, context-switching between structured and creative outputs can be challenging, as LLMs navigate different cognitive pathways for tasks like code generation versus creative writing. JSON, for instance, is well-suited for structured data output but may hinder creativity, while freeform inputs promote spontaneity. The choice of idiom should align with the task's goals, balancing the need for structure with the potential for innovation. In practice, combining idioms, such as using Markdown for readability and XML for attachments, can enhance prompt engineering by optimizing clarity and functionality.