This video could not play here.
It may be members-only, region-restricted, or unavailable in embedded players.
Attention is Expensive: Optimizing Context Windows for Precision and Cost - Maya Halevy
As context windows expand, LLMs remain bound by the constraints of their architecture. The way we engineer this context determines both the accuracy and cost of our applications. Transformer Architecture: How the limitations of the attention mechanism create specific “danger zones” in your prompts/context.
The “Lost in the Middle” Phenomenon: An architectural explanation of why long contexts degrade and how to structure data to mitigate it. Techniques for compressing prompts/context without losing semantic value. Structuring the Window: Where to place instructions, few-shot examples, and retrieved data for maximum model adherence.
The goal of this talk is to take us away from the mindset of LLMs as a non-deterministic “black box”, and towards an ‘engineering context’ based on architectural first principles.
###
The following sources were used as reference and inspiration for this talk:
Attention is all you need. arXiv. https://doi.org/10.48550/arxiv.1706.03762 3Blue1Brown. (2024, April 1).
But what is a GPT? Visual intro to Transformers | Chapter 1 [Video]. YouTube. https://www.youtube.com/watch?v=eMlx5fFNoYc
Kurt, W. (2024, August 12). Say what you mean: A response to 'Let Me Speak Freely'. Count Bayesie. https://www.countbayesie.com/blog/2024/8/12/say-what-you-mean-a-response-to-let-me-speak-freely
Liu, N. F., Lin, K., Hewitt, J., Paranjape, A., Bevilacqua, M., Liang, P., & Potts, C. (2023). Lost in the middle: How language models use long contexts. arXiv. https://arxiv.org/abs/2307.03172 Pocock, M. (2024, February 21).
Most devs don't understand how context windows work [Video]. YouTube. https://www.youtube.com/watch?v=-uW5-TaVXu4 Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., & Polosukhin, I. (2017).
Tam, Z. R., Wu, C.-K., Tsai, Y.-L., Lin, C.-Y., Lee, H.-y., & Chen, Y.-N. (2024). Let me speak freely? A study on the impact of format restrictions on performance of large language models. Association for Computational Linguistics. https://doi.org/10.18653/v1/2024.emnlp-industry.91