AI Engineer

Beyond RAG: Build a Relational Context Engine from Scratch — Peter Werry, Unblocked

Oct 11, 2026AI Engineer
SummaryAI, from the source post

This talk introduces a 'Relational Context Engine' that goes beyond traditional RAG by transforming natural language queries into structured database queries. It addresses the limitations of similarity search for engineering context (PRs, tickets, chat) which has inherent structure (authors, dates, relationships). The engine is built in four parts: schema discovery (sampling documents to infer types and enums), identity resolution (mapping users to their GitHub logins), query planning (forcing tool calls and including dates), and validation (using allow lists for operators and sanitizing metadata for tenant isolation). A retry loop handles execution errors, and the system demonstrates the need for full-text search when exact matches fail. The same engine powers a chat agent, and Q&A covers scaling schemas, continuous ingestion, and hybrid search.

More from the Distributed Systems trail