DEV Community

Kumar Kislay
Kumar Kislay

Posted on

How We Architected Context: The Connect-Link-Query Pattern

TL;DR
Most "AI search" tools just keyword-match your documents. To actually understand engineering context, you need a graph. Here is the 3-step pipeline we used to build a RAG-native graph that connects code, meetings, and decisions automatically

Building a RAG-Native Knowledge Graph (Without the PhD)
We’ve all been there: trying to figure out why a piece of code exists, but the answer is buried in a Zoom transcript from three months ago. Standard RAG (Retrieval-Augmented Generation) often fails here because it retrieves text chunks, not relationships.

To solve this, we moved beyond simple vector search and built a "Knowledge Graph" that maps the actual relationships between your tools.

Here is the 3-step process we use to turn scattered data into a queryable graph.

Step 1: The Unified Ingestion (Connect)
The first step is aggregation. You can't query what you can't see. We built connectors for the "Big 4" of engineering data:

Code: GitHub/GitLab
Comms: Slack
Planning: Jira/Linear
Time: Calendar/Zoom

Instead of just dumping text into a vector database, we ingest these as distinct Entities (e.g., a Commit, a Meeting, a Ticket).

Step 2: Automatic Context Linking (The "Graph" Part)
This is where the magic happens. Standard tools leave data in silos. We use a secondary AI layer to identify relationships between these entities automatically.

For example, if a Pull Request mentions "Ticket-123", we create a hard edge in the graph. But we go deeper:

Temporal Linking: "This meeting happened 10 minutes before this major commit."

Semantic Linking: "This Slack thread discusses the same 'Auth Bug' found in the Jira ticket."

This creates a Knowledge Graph where you can visually see connections between people, projects, and decisions.

Step 3: Graph-Based Retrieval (Query)
Finally, when a user asks, "Why did we move to PostgreSQL?", we don't just keyword search for "PostgreSQL."

We traverse the graph:

Identify the Decision entity regarding the database.
Follow the edges to the Meeting where it was discussed.Pull the PR that implemented the change.
Pull the PR that implemented the change.

The result? The user sees the meeting summary and the code PR side-by-side, answering the "why" instantly.

Conclusion
Building a graph sounds intimidating, but it's really just about respecting the relationships between your data. By connecting these dots automatically, we stop knowledge from walking out the door when a developer leaves.

Top comments (0)