Conceptual Overview
The Semantic Model in Lyzr is a system designed to enable intelligent understanding, documentation, and utilization of structured tabular data (such as database tables) in AI workflows. It acts as a bridge between raw relational data and human-readable, AI-consumable knowledge by semantically enriching tables with detailed context.What is a Semantic Model?
A Semantic Model adds meaning and context to structured data by attaching:- Table-level descriptions: High-level summaries that describe what a table represents.
- Column-level metadata: Detailed natural language explanations for each column’s purpose and data type.
- Data previews: Sample rows that provide real-world context to help AI systems and humans better understand usage.
- Retrieval-Augmented Generation (RAG) flows,
- Search and documentation agents, and
- Natural language interfaces over data.
Why Use Semantic Modeling?
Traditional databases lack human-centric explanations, making it hard for:- Developers to understand schemas quickly,
- AI models to answer data-related questions accurately,
- Non-technical users to interact with structured data.
- Generating semantic documentation automatically using LLMs.
- Structuring the output for both human consumption and AI workflows.
- Saving the enhanced information in a vectorized format for fast and relevant retrieval.
Core Workflow
- Input Source: A database table with rows and schema is provided as input.
- LLM-Powered Inference: A language model reviews table structure and sample data to generate descriptions.
- Semantic Description Output:
- What the table is about
- What each column represents
- How the table connects to business or analytical use cases
- Storage & Retrieval:
- These semantic blocks are embedded and stored in a vector database.
- Future retrievals (like question answering or agent planning) can now pull contextually rich, accurate descriptions.
Components of the Semantic Model
Component | Description |
---|---|
Table Name | The identifier of the dataset |
Table Description | A high-level explanation of the table’s content and intent |
Columns | A list of column names, each paired with a natural language description and data type |
Preview Records | Optional rows from the table used for contextual grounding |
RAG Config | Configuration used to generate or retrieve this semantic documentation |
Task Handling | For large datasets, semantic documentation can be generated asynchronously |
Benefits
- Improved Discoverability: Semantic metadata makes it easier to search and explore datasets.
- Agent Integration: Documentation agents and RAG models can use this metadata to answer user queries with high precision.
- Auto-Documentation: Automatically generated explanations save time for data engineers and analysts.
- Natural Language Access: Even non-technical users can query data through AI using the semantic layer as a knowledge base.
AI Readiness with Structure
The Semantic Model ensures that your structured data is not just readable, but meaningful and navigable by both humans and machines. It turns flat schemas into rich knowledge representations that power the future of AI-driven data interfaces. Lyzr Studio’s Semantic Model enables intelligent querying of structured data like databases or CSVs using natural language. It enriches your data tables with semantic metadata, making them easier to understand, document, and interact with — both for humans and AI agents.1. Choose Knowledge Base Type
When creating a new Knowledge Base, select Semantic Model from the list of KB types.
2. Connect a Structured Data Source
To use the Semantic Model, you must link a database or upload structured files.- Navigate to Data Connectors in Studio.
- Click Create New to register a data source.
- Provide:
- Database Type (e.g., PostgreSQL, MySQL)
- Host, Port, Username, Password
- Database Name
3. Generate Semantic Documentation
Lyzr automatically infers rich metadata from the table schema and sample rows using LLMs.- Table Descriptions: What each table represents in plain English.
- Column Metadata: Natural language explanations for column names and data types.
- Sample Records: A few representative rows to provide grounding.
4. Query Structured Data via AI
Once your Semantic Model is configured, it can power AI agents that understand your schema and generate accurate SQL queries in real time.- Agents use the semantic documentation to infer context.
- Natural language prompts (e.g., “Get top 10 customers by revenue”) are converted into executable SQL.
- Agents retrieve actual rows from your database or uploaded CSVs.
5. Schema Documentation Agent
For deeper schema context, create a Schema Documentation Agent.- Choose your preferred LLM (GPT-4, Claude, etc.).
- The agent will enhance descriptions at both table and column levels.
Summary
Feature | Description |
---|---|
Structured Data Support | Connect live databases or structured CSVs. |
AI-Powered Documentation | Auto-generate table/column descriptions using LLMs. |
Text-to-SQL Enabled | Agents can query data using natural language. |
Schema Agent Integration | Deepens understanding of data context. |
Ideal Use Case | For analytics, operations, sales, or any SQL-accessible business data. |
With the Semantic Model, Lyzr bridges the gap between raw relational databases and intuitive, natural language interfaces — letting teams unlock insights from structured data with ease.