nat.plugins.vanna.training_db_schema#

Manual training data and configuration for Vanna text-to-SQL.

This module provides default DDL statements, documentation examples, question-SQL pairs, and prompt templates used to train and configure the Vanna text-to-SQL model with database schema context.

Attributes#

Module Contents#

VANNA_TRAINING_DDL: list[str] = ['CREATE TABLE customers (id INT PRIMARY KEY, name VARCHAR(100), email VARCHAR(100), created_at...#
VANNA_TRAINING_DOCUMENTATION: list[str] = ['The customers table contains all registered users. The created_at field shows registration...#
VANNA_TRAINING_EXAMPLES: list[dict[str, str]]#
VANNA_ACTIVE_TABLES = ['catalog.schema.table_a', 'catalog.schema.table_b']#
VANNA_RESPONSE_GUIDELINES = Multiline-String#
Show Value
"""
Response Guidelines:
1. Carefully analyze the question to understand the user's intent, target columns, filters, and any aggregation or grouping requirements.
2. Output only JSON:
{
    "sql": "<valid SQL query>",
    "explanation": "<brief description>",
}
"""
VANNA_TRAINING_PROMPT = Multiline-String#
Show Value
"""
Response Guidelines:
1. Generate 20 natural language questions and their corresponding valid SQL queries.
2. Output JSON like: [{{"question": "...", "sql": "..."}}]
"""