PyData London 2026

Making Databases LLM-Ready: Building Production Semantic Layers with Semantido
2026-06-05 , Grand Hall 1

We'll explore the architecture of production-grade semantic layers, demonstrating how Semantido enables reliable text-to-SQL applications by providing LLMs with rich contextual understanding of database schemas, relationships, and business logic. Attendees will learn practical patterns for implementing semantic layers that bridge the gap between user intent and database queries by building a semantic layer for a fictional company.


Learning Objectives

By the end of this tutorial, participants will be able to:

  • Design and implement semantic models that capture business logic and domain knowledge alongside database schema definitions
  • Build LLM integrations that leverage semantic metadata for accurate query generation and validation
  • Implement observability patterns for monitoring and debugging
  • How to evaluate semantic layer quality
  • Deploy scalable semantic APIs that abstract database complexity from LLM applications

Desired Tutorial Structure (90 minutes)

Part 1: Foundations (~20 minutes)

  • The Text2SQL Challenge: Why naive approaches fail
  • Semantic Layer Architecture: Core concepts, design patterns, and the role of metadata in LLM reliability
  • Semantido Quick Start: Installation, project setup, and connecting to the playground database
  • Hands-on Exercise: Participants will set up their development environment and connect semantido to a provided database.

Part 2: Building Your First Semantic Layer (~25 minutes - 35 mins)

  • Declarative Model Definition: Extending SQLAlchemy models with business metadata, descriptions, and constraints
  • Relationship Semantics: Annotating foreign keys, joins, and cross-table business rules
  • Domain Knowledge Injection: Adding enums, validation logic, and computed fields with business meaning
  • Hands-on Exercise: Participants will build a semantic layer for a given database, adding rich metadata that describes the tables and columns both in application and business terms.

Part 3: LLM Integration Patterns (~20 minutes)

Context aware Query Generation: Using semantic layers with FastAPI and LangChain for SQL generation
*
Hands-on Exercise*: Participants build a simple chatbot that answers natural language questions about orders by querying the semantic layer. Participants will implement query validation and test it with ambiguous questions.

Part 4: Production Considerations (~20 minutes)

  • Observability and Debugging (6 min): Logging semantic context, tracing query generation, and monitoring LLM-database interactions
  • Evaluation Framework (5 min): Testing semantic layer quality with automated benchmarks and business logic validation
  • Deployment Patterns (4 min): Docker, FastAPI integration, and scaling considerations
  • Hands-on Exercise: Participants will add observability instrumentation to their semantic layer and run an evaluation suite that tests query accuracy against known business questions.

Part 5: Production Considerations (15 minutes)
* Q&A: Open discussion and troubleshooting

See also: Notebook LM generated deck based on the semantido codebase (2.2 MB)

After 12+ years architecting and engineering cloud solutions for small and large enterprises, I recognized that AI represents not a replacement for expertise, but its natural evolution. Join me in shaping the semantic layer for AI-ready data.