---
title: "Text-to-SurQL: Prompt engineering for agentic retrieval | Webinar | SurrealDB"
url: https://surrealdb.com/events/text-to-surql-prompt-engineering-for-agentic-retrieval
---

Loading webinar...

Thursday, August 27 at 6:00 PM GMT+1

Webinar

# Text-to-SurQL: Prompt engineering for agentic retrieval

Share

## About this webinar

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.

Speakers

![Martin Schaer](https://cdn.surrealdb.com/k569ad7lxxtzxxkk5re1vpr5.auto)

Martin Schaer

AI Solutions Engineer at SurrealDB

## 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

```json
{"@context":"https://schema.org","@type":"Event","name":"Text-to-SurQL: Prompt engineering for agentic retrieval","description":"","startDate":"2026-08-27T17:00:00.000Z","endDate":"2026-08-27T18:00:00.000Z","image":"https://cdn.surrealdb.com/8mpw0snofv1w1ugv2378mhid.auto","url":"https://surrealdb.com/events/text-to-surql-prompt-engineering-for-agentic-retrieval","eventStatus":"https://schema.org/EventScheduled","eventAttendanceMode":"https://schema.org/OnlineEventAttendanceMode","location":{"@type":"VirtualLocation","url":"https://surrealdb.com/events/text-to-surql-prompt-engineering-for-agentic-retrieval"},"organizer":{"@type":"Organization","name":"SurrealDB","url":"https://surrealdb.com","logo":{"@type":"ImageObject","url":"https://surrealdb.com/assets/static/logo.BG7_TG2b.svg"}},"performer":[{"@type":"Person","name":"Martin Schaer","jobTitle":"AI Solutions Engineer","worksFor":{"@type":"Organization","name":"SurrealDB"}}]}
```

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://surrealdb.com"},{"@type":"ListItem","position":2,"name":"Events","item":"https://surrealdb.com/events"},{"@type":"ListItem","position":3,"name":"Text-to-SurQL: Prompt engineering for agentic retrieval","item":"https://surrealdb.com/events/text-to-surql-prompt-engineering-for-agentic-retrieval"}]}
```

```json
{"@context":"https://schema.org","@type":"Organization","name":"SurrealDB","url":"https://surrealdb.com","logo":"https://surrealdb.com/assets/static/logo.BG7_TG2b.svg","description":"SurrealDB is the unified data layer for AI. A multi-model database for documents, graphs, vectors, and time-series.","foundingDate":"2022","hasCertification":[{"@type":"Certification","name":"SOC 2 Type 2"},{"@type":"Certification","name":"GDPR"},{"@type":"Certification","name":"Cyber Essentials Plus"},{"@type":"Certification","name":"ISO 27001"}],"owns":[{"@type":"SoftwareApplication","name":"SurrealDB","url":"https://surrealdb.com/surrealdb"},{"@type":"SoftwareApplication","name":"Agent Memory","url":"https://surrealdb.com/agent-memory"}],"knowsAbout":["multi-model databases","document databases","graph databases","vector search","time-series databases","SurrealQL","Agent Memory","real-time databases","embedded databases","context layer","graph ontology","distributed database","knowledge graphs","distributed transaction protocols","highly-scalable databases"],"sameAs":["https://www.wikidata.org/wiki/Q124316308","https://github.com/surrealdb/surrealdb","https://twitter.com/surrealdb","https://www.youtube.com/@surrealdb","https://www.linkedin.com/company/surrealdb","https://discord.gg/surrealdb","https://www.reddit.com/r/surrealdb","https://www.instagram.com/surrealdb","https://medium.com/surrealdb","https://dev.to/surrealdb"]}
```
