Awesome-Context-Engineering  by Meirtz

A survey of context engineering for LLMs

created 1 month ago
1,837 stars

Top 23.5% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
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

1 week ago

Responsiveness

1 day

Pull Requests (30d)
3
Issues (30d)
8
Star History
1,721 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.