WhoBuilt

Context Engineering: Connecting the Dots with Graphs

Nov 24, 2025· 27 min· 7.4K views·Watch on YouTube

Speaker

Stephen Chin, VP of Developer Relations at Neo4j, explains how knowledge graphs support context engineering, GraphRAG, and agent memory at AI Engineer Code Summit.

Context engineering shapes what models receive

Chin describes context engineering as a broader practice than prompt writing: it combines instructions, retrieved business data, conversation history, and structured outputs. Carefully selecting and ordering relevant information can reduce noise and improve results, especially when models have large context windows but limited attention.

Graphs connect facts for retrieval

Knowledge graphs represent people, things, and their relationships, with properties such as a car’s make and model or how long someone has driven it. Chin says graphs can also hold embeddings for vector search. GraphRAG combines similarity search with graph relationships to retrieve more connected facts and make the supplied context easier to inspect.

A vulnerability demo grounds answers in a graph

Chin demonstrates the Neo4j Knowledge Graph Builder using supply chain and VEX security documents, including information about vulnerabilities in the Jackson library. A two-pass retrieval process first finds similar nodes, then follows their relationships to gather context. The demo returns details such as affected versions and remediation information, while a question about an unmentioned library is intended to fall outside the graph’s knowledge.

Graph memory and traversal add connected context

Chin describes storing entities, relationships, text, embeddings, and time in a memory graph, then using vector search and graph algorithms to retrieve relevant information. In his example, graph links connect Stephen Chin, colleague Sid, their GIDS presentation in Bangalore, and its timing. He says GraphRAG is especially useful when an answer depends on multiple related facts.

Agentic retrieval follows the graph in stages

Chin compares preplanned graph queries, text-to-Cypher, and agentic traversal, where an agent repeatedly queries the graph as it gathers evidence. In a Claude Code demo using Neo4j’s Cypher MCP server, the agent inspects the schema, runs several Cypher queries, and retrieves text attached to graph nodes. The resulting vulnerability report includes details such as the CVE, severity, attack type, affected versions, and remediation advice.

Takeaways

  • Treat context as a curated mix of instructions, retrieved data, memory, and structured output.
  • Use graph retrieval when an answer depends on multiple connected facts; simple vector search can suit one-shot lookups.
  • Store relationships and time alongside text and embeddings to support richer memory queries.
  • Let agents inspect the graph schema and traverse related nodes when a detailed answer needs evidence from several places.
  • Keep answers grounded in a defined knowledge pool, and make retrieved graph evidence available for inspection.

Mentioned in this talk

Search inside this talk

What was claimed 7

Related talks