Awesome-Context-Engineering  by Meirtz

A survey of context engineering for LLMs

Created 3 months ago
2,415 stars

Top 19.0% on SourcePulse

GitHubView on GitHub
Project Summary

This repository provides a comprehensive survey of Context Engineering, a field evolving from prompt engineering to manage the complete information payload for LLMs in production systems. It targets AI researchers and engineers seeking to build more robust, scalable, and reliable AI agents by systematically organizing and optimizing the context provided to LLMs.

How It Works

Context Engineering formalizes the LLM generation process as $P(\text{output} | \text{context}) = \prod_{t=1}^T P(\text{token}_t | \text{previous tokens}, \text{context})$, where context is a structured assembly of components like instructions, knowledge, tools, memory, state, and query. This contrasts with static prompt engineering, enabling dynamic, multi-component optimization to maximize task rewards within context window constraints. The approach is grounded in information theory and Bayesian inference for adaptive retrieval and context management.

Quick Start & Requirements

This repository is a curated collection of research papers, frameworks, and implementation guides. It does not require installation or execution but serves as a knowledge base.

Highlighted Details

  • Comprehensive academic survey paper published on arXiv and Hugging Face Papers.
  • Detailed breakdown of Context Engineering principles, components, techniques (RAG, Memory Systems, Agent Communication, Tool Use), and evaluation paradigms.
  • Extensive lists of related surveys, foundational research, and practical applications in complex research and production systems.
  • Formal mathematical definitions and theoretical frameworks for Context Engineering.

Maintenance & Community

The project is actively maintained, with recent updates in July 2025. Community discussion is encouraged via GitHub issues. Contact information for Lingrui Mei is provided for questions and collaboration.

Licensing & Compatibility

The project is licensed under the MIT License, permitting commercial use and integration with closed-source systems.

Limitations & Caveats

The repository is a survey and does not provide executable code. While comprehensive, it is an ongoing effort, and information may be subject to updates or omissions. Key limitations in the field include context window constraints, computational overhead, and maintaining context coherence.

Health Check
Last Commit

2 months ago

Responsiveness

1 day

Pull Requests (30d)
1
Issues (30d)
1
Star History
222 stars in the last 30 days

Explore Similar Projects

Starred by Eric Zhu Eric Zhu(Coauthor of AutoGen; Research Scientist at Microsoft Research) and Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems").

PromptWizard by microsoft

0.3%
4k
Agent-driven framework for task-aware prompt optimization
Created 1 year ago
Updated 2 weeks ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Didier Lopes Didier Lopes(Founder of OpenBB), and
2 more.

aie-book by chiphuyen

1.6%
10k
AI engineering resource and book (2025) for adapting foundation models
Created 10 months ago
Updated 8 months ago
Feedback? Help us improve.