Beyond RAG: Build a Relational Context Engine from Scratch
Ask a vector store for the PRs you merged last week and it can return one that is semantically perfect and three years old. In this workshop, Peter Werry, one of our founding engineers, gives a technical explanation of why RAG, meaning similarity search, is only half of retrieval. Engineering context lives in pull requests, review comments, tickets, wikis and chat, and all of it carries structure: authors, dates, states, labels and relationships. Similarity search and reranking alone can't answer a question that depends on time or structure. The other half is translating natural language into a real database query, so the model writes the query rather than answering the question. Across six stacked pull requests, Peter turns a stubbed query playground into a working relational context engine over a GitHub repository.
What we cover
- Why similarity search fails questions about authors, dates and state
- Schema discovery: sampling 300 documents and inferring types in code, not with a model
- Identity resolution, and planning queries with the schema, a name-extraction tool call and the current date
- Deny-by-default validation and tenant isolation for model-generated queries
- Retry loops, and when a failed query means you need full-text search
- Q&A: scaling schemas, continuous ingestion, Slack, MCP and hybrid search
Peter Werry