TLDRocket
Sign in

AI Best Practices

17 summarised stories about AI Best Practices, each linking back to the original source. Browse all topics →

Sunday, 26 May 2024

Prompting Fundamentals and How to Apply them Effectively

Eugene Yan 2 years ago

The article explains fundamental techniques for writing effective prompts for large language models, including assigning roles, using structured input/output formats, prefilling responses, and providing multiple examples. Key techniques discussed include using XML tags for structure, providing at least 12 examples in n-shot prompting (not just 3-5), and matching example distributions to production data. The practical application of these fundamentals helps LLM users obtain more reliable and consistent outputs through better conditioning of the model's probabilistic behavior.