Vibeleaderboard
← All Intel
Intel / video

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

Source
youtube.com
Author
AI Engineer
Date

Context

Similarity search can retrieve a pull request (a proposed code change) that sounds relevant while ignoring that it is three years old. In the Unblocked workshop, Peter Werry handles questions such as which pull requests a person merged last week by having a model write a structured database query over authors, dates, states and relationships instead of asking the model to answer from vector matches alone.

Making that safe requires more than text-to-query generation. The system samples documents to discover a , resolves a person's name to an account, supplies the current date, restricts allowed operators, and wipes and reinjects hidden used for per-customer isolation, so the model cannot alter it. Execution errors feed a retry loop, while exact-match failures reveal where full-text search is still needed. The result is a engine in which semantic retrieval finds related language and validated queries enforce temporal and structural conditions.

Key takeaways · AI-distilled
  • Schema discovery samples 300 documents and merges them into one tree with procedural code rather than a model, giving the query planner reliable types and enums.
  • Identity resolution uses simple fuzzy matching to map a name like Peter to a GitHub login, and the query planner receives the schema, a forced name-extraction tool call and the current date, which questions like "last week" depend on.
  • Validation is deny by default: an operator allow list stops a function clause from running JavaScript on the server, and hidden metadata fields are wiped and reinjected to keep tenants isolated.
  • A retry loop feeds validation and execution errors back to the model, and those failures exposed the need for full-text search where exact matching missed.
Terms in this piece · Glossary
  • Schema — A written description of a data format: which fields exist, what kind of value each holds and which are required.
  • Metadata — Data about a file, such as its name, size and timestamps, as distinct from its contents.
  • Context and context window — Context is the information available for a generation; the context window is the capacity available to hold it.
  • Field — One named piece of a record, such as name or approved_on; a record is one entity's set of values, one per field.

Get the Brief

A cited digest of what matters for people building with AI, every morning. Unsubscribe anytime. See today’s edition

Read the source www.youtube.com
More from AI Engineer
Recommended reads