Перейти к содержимому

Crintea - Making Databases LLM-Ready Building Semantic Layers with Semantido | Pydata London 26

PyData

0:00 / 0:00

Crintea - Making Databases LLM-Ready Building Semantic Layers with Semantido | Pydata London 26

1 269 просмотров · 3 месяца назад
PyData
173 тыс. подписчиков
1 269 просмотров · 3 месяца назад
Dragos Crintea - Making Databases LLM-Ready: Building Production Semantic Layers with Semantido 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 www.pydata.org PyData is an educational program of NumFOCUS, a 501(c)3 non-profit organization in the United States. PyData provides a forum for the international community of users and developers of data analysis tools to share ideas and learn from each other. The global PyData network promotes discussion of best practices, new approaches, and emerging technologies for data management, processing, analytics, and visualization. PyData communities approach data science using many languages, including (but not limited to) Python, Julia, and R. PyData conferences aim to be accessible and community-driven, with novice to advanced level presentations. PyData tutorials and talks bring attendees the latest project features along with cutting-edge use cases. 00:00 Welcome! 00:10 Help us add time stamps or captions to this video! See the description for details. Want to help add timestamps to our YouTube videos to help with discoverability? Find out more here: https://github.com/numfocus/YouTubeVi...