

Webinar: Prompt engineering for agentic retrieval (Text-to-SurQL)
Most text-to-SQL agents fail for the same boring reason: someone pasted a schema into a system prompt months ago, a field was renamed since, and the model has been confidently writing queries against a database that no longer exists. No runbook fixes that, because documentation always rots at exactly the speed your schema changes. This session takes a different approach. Instead of maintaining the prompt as a document, we generate it as a query. SurrealDB can describe its own live structure, carry notes written specifically for the model inside its DDL, and assemble the finished prompt server side.
In this session you'll learn:
- How to generate a schema block for your prompt from live database state, so it can never drift
- Writing schema comments for a third audience: not the engine, not your colleagues, but the model
- Grounding low-cardinality values in real data to stop the most common class of hallucination
- Retrieving few-shot examples by meaning with vector search instead of hardcoding them
- Why graph traversals are an easier generation target than JOINs, and what that removes
- Enforcing safety with read-only roles, query plan checks, and timeouts rather than regex filters
- Closing the loop so accepted queries improve the next generation
Speakers
Martin Schaer, AI Solutions Engineer @ SurrealDB