bcallender GitHub avatar

agent-context-workshop

bcallender

一个构建代码知识图谱的工作坊,用于编码智能体,并评估其相比传统grep方法的有效性。

Stars

16

7 天增长

暂无数据

Fork 数

8

开放 Issue

0

开源协议

Apache-2.0

最近更新

2026-06-29

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它提供了诚实的评估,显示基于图谱的上下文在确定性和效率上优于grep,并引入了智能体采纳率这一新颖指标。

适合谁使用

  • 编码智能体开发者
  • 专注代码理解的AI/ML研究人员
  • 构建开发者工具的软件工程师
  • 对代码分析感兴趣的Rust开发者

典型使用场景

  • 提升编码智能体在关系问题上的准确性
  • 降低智能体上下文的token消耗
  • 实现确定性的代码查询
  • 评估上下文工程策略

项目优势

  • 30个金标准问题的可复现评估显示,图谱在准确率上与grep持平,但在确定性上胜出
  • 输入token数量约为grep的1/3
  • 新颖的采纳率指标:提示后72%智能体使用图谱,无提示时仅34%
  • 开源并提供Jupyter笔记本和缓存评估数据,便于复现

使用前须知

  • 示例仅限于单个Rust代码库(qdrant)
  • 完整图谱遍历需要Neo4j数据库
  • 结果可能不适用于其他语言或代码库

README 快速开始

Agent Context Workshop

A context layer for coding agents — built, then measured.

Most coding agents explore a codebase by grepping it. This workshop builds the alternative: a code knowledge graph an agent can traverse instead — then runs an honest eval to see whether it actually helps, and whether the agent uses it.

The worked example is qdrant (a real Rust vector database). We extract its structure into a Neo4j graph and give an agent graph tools (search, blast_radius, implementors, …). Then we pit a graph agent against a grep agent on 30 gold-verified questions.

The honest result: on single-shot accuracy they roughly tie (graph 21/30, grep 19/30). The graph wins on what matters in production — determinism (right on every run: graph 19/30 vs grep 11/30, and 12/15 vs 6/15 on relationship questions — grep re-derives the connections each run and flips), efficiency (~3× fewer input tokens), and the metric nobody reports: adoption (does the agent reach for the graph at all — 34% → 72% with the right nudge).

The two mental models

Three rungs of building the context layer (each notebook walks them):

RungWhatHowDeterminism
0 · syntacticsymbols, spanstree-sitterdeterministic
1 · resolutiontypes, impls, edgesrustdoc JSONdeterministic
2 · meaningintent, stabilityfenic + an LLMmodel-backed, cached

Three levels of context engineering (what the eval compares): L1 grep → L2 index + search → L3 graph traversal.

Quickstart

Prereqs: uv, Docker (optional — only for notebook 01's graph), and an OpenRouter key (optional — only for live LLM calls; the eval is cached).

uv sync                       # install (slim — one provider, via OpenRouter)
scripts/setup_data.sh         # hydrate the committed qdrant seed (~2MB) into data/
cp .env.example .env          # add OPENROUTER_API_KEY for live calls (optional)
uv run jupyter lab

Then — new here? jump to notebook 02 (the eval; no Docker, no key needed). The full set, in order:

  • notebooks/00_start_here.ipynb — a 30-second preflight: confirms your install + data are ready and routes you. Run it first.
  • notebooks/01_posting_list_context.ipynb — bu

项目描述

A context layer for coding agents — build a code knowledge graph from a real codebase, then measure whether the agent actually uses it. AI Engineer World's Fair 2026 workshop.

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

l0ng-ai
精选
l0ng-ai GitHub avatar

tty7

tty7 is a fast, GPU-accelerated terminal workbench with persistent sessions, built-in input tools, SSH support, and coding agent awareness.

开发者工具CLI 与终端
359
steelbrain
精选
steelbrain GitHub avatar

reims-vgpu

reims-vgpu is an experimental virtual GPU for macOS guests that uses QEMU to decode the guest's GPU command stream and execute it through Metal or Vulkan, leveraging the built-in AppleParavirtGPU driver without requiring custom kexts.

桌面应用
143
m-novotny
精选
m-novotny GitHub avatar

memguard-rs

A Rust library that provides secure memory handling primitives including zeroization on drop, memory locking, constant-time comparison, and compile-time guarded regions, with zero dependencies and no_std support.

嵌入式与物联网安全
131