bok-summer-25
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Help
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# context-engineering Here’s a cleaned-up version of the LangChain blog post, formatted in Markdown for easy insertion into your `.md` file: --- ## The Rise of "Context Engineering" *Published: Jun 23, 2025* *Header image from Dex Horthy on Twitter* --- ### What Is Context Engineering? **Context engineering** is the practice of building dynamic systems that provide the *right information* and *tools* in the *right format* so that a large language model (LLM) can plausibly accomplish a task. > Most agent failures stem from missing or misformatted context, not from model inadequacy. As LLM applications evolve from single prompts into dynamic, agentic systems, context engineering is becoming the most crucial skill an AI engineer can develop. --- ### Breaking It Down #### Context Engineering Is a System LLMs rely on context from many sources: developer input, user interaction, prior history, tool outputs, and external data. Gathering and integrating this into a coherent system is non-trivial. #### It Must Be Dynamic Since many sources of context are dynamic, the system itself must be able to construct prompts on-the-fly—not just rely on a single static prompt. #### You Need the Right Information If your agent fails, check the context. LLMs can’t infer what isn’t there. Garbage in, garbage out. #### You Need the Right Tools Context isn't just textual—LLMs may need tools for lookup, actions, or computation. Equipping the LLM with the right tools is as important as giving it the right data. #### Format Matters Like humans, LLMs are sensitive to how information is presented. A concise message is more effective than a bloated JSON blob. Tool input parameters must also be clearly structured. #### Can It Plausibly Accomplish the Task? Ask this regularly. If an LLM fails, was it given enough to succeed? If yes, it’s a model issue. If no, it’s a context issue. The fix differs depending on the failure mode. --- ### Why Is Context Engineering Important? When agentic systems break down, it’s usually due to one of two causes: 1. **The model isn’t capable enough.** 2. **The model wasn’t given proper context.** As LLMs improve, the second cause dominates. Common context issues include: * **Missing data** – The model can't guess what it hasn’t been told. * **Poor formatting** – Presentation significantly impacts understanding and output quality. --- ### Context vs. Prompt Engineering Prompt engineering involves clever phrasing. Context engineering involves **structured systems** that dynamically build those prompts with the right inputs. * Prompt engineering is a **subset** of context engineering. * Instructions for how an agent should behave are a part of both. > A well-designed system doesn’t just phrase things well—it makes sure the model *knows* what it needs to know, *when* it needs to know it. --- ### Examples of Context Engineering * **Tool Use:** Provide tools with clear interfaces and digestible outputs. * **Short-Term Memory:** Summarize long conversations and reinsert the summary. * **Long-Term Memory:** Recall user preferences across sessions. * **Prompt Engineering:** Clearly define how agents should behave. * **Retrieval-Augmented Generation (RAG):** Dynamically fetch and insert relevant information. --- ### LangGraph: Built for Context Engineering **LangGraph** was designed for control. You choose: * What steps run * What goes into your LLM * Where outputs are stored Unlike black-box agent frameworks, LangGraph enables full control over context construction. > See also Dex Horthy’s ["12 Factor Agents"](https://x.com/dexhorthy), which echoes these ideas ("own your prompts", "own your context building", etc.). --- ### LangSmith: Observe and Debug Context **LangSmith** provides observability for LLM apps. Even before the term "context engineering" was coined, LangSmith’s tracing tools helped developers understand: * What context was gathered * How it was formatted * Which tools were involved You can inspect every input and output, making it easier to debug context-related failures. --- ### Communication Is All You Need A previous blog post emphasized that communication is often the root cause of agent failure. That sentiment holds: **context engineering is effective communication with machines**. It's not a new idea—it’s a new name for a rapidly solidifying practice. --- > We'll be sharing more on this topic soon. LangGraph and LangSmith were built to empower context engineers. We're excited to see the field embrace this. --- © LangChain Blog 2025 [Subscribe to updates](#) --- Let me know if you'd like a version with additional formatting (e.g., callout blocks, image embeds, or side-by-side examples).

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully