Agents icon
AGENT

Text2SQL Live

Transforms analytics questions into SQL queries and delivers accurate results by applying metadata, business rules, and domain knowledge.

The Text-to-SQL Agent enables business users to query structured data in natural language by identifying the relevant database, tables, columns, and joining conditions. Leveraging metadata and business rules, it creates, validates, and executes optimized SQL queries. This agent is configured to a specific use case or dataset using the schema, table metadata, and business rules. Required inputs are a valid use case, user question and permissions, with optional inputs such as context from previous questions, business domain or filters.
Brands & Indications
Franchises
Oncology (ONC)
AI Skills
Natural Language Understanding
Code Generation
Application
LAILA
Version Number
1.0
Release Notes
N/A
Point of Contact
Mallikharjuna Munugoti

Configurations

The configurations that allow this agent to be used for a specific business context and data source

Table Metadata
Defines structured dataset attributes such as table description, column descriptions, brand/domain context.
Business Rules
A set of business rules and default instructions that govern how the agent translates natural language questions into SQL safely and accurately. For example the calculation logic for a metric such as " Market Share" and that if not otherwise specified this metric should default to TRx Market Share for the last 12 months.
Database Connection
List of credentials, endpoints, and connection parameters required for the agent to access underlying databases (Snowflake, Postgres, etc.).
Metadata: Enhances AI's understanding by supplying instructions, business term definitions, synonyms, acronyms, and links between data and business terms using business rules. This information must be provided by a business SME.
New Configuration Instructions
Configurations for this agent are determined by dataset or use case. To configure this agent for a new dataset or use case, reach out to the LAILA team with the dataset details. Together discuss the question themes you want the Text2SQL agent to address and receive templates for onboarding your use case's questions, metrics, business rules, and synonyms.
Configured Data Sources
Oncology Sub-National sales FFP

Prompt Guide

Required Inputs

User Question
Description
The question provided by the end-user in plain, human-readable language
Accepted Values
String containing the user’s inputted question
User Access Information
Description
Metadata related to the user’s identity and access privileges used for authorization and logging
Accepted Values
User Email
Use Case Name
Description
A valid and configured use case identifier that is used to track and determine the workflow for each user question.
Accepted Values
Valid use case string, e.g. "Subnational"

Optional Inputs

Context from Previous Questions
Description
Details retained from the user’s earlier questions to maintain continuity in multi-step conversations.
Accepted Values
User question, parameters, or structured data carried over from the previous question
Use Case Specific Parameters
Description
Domain-specific inputs that refine or filter the query
Accepted Values
TA (Therapeutic Area): Oncology Franchise: Franchise V Indication: AML, CLL, or All

Example Prompts

Show me the sales for Venclexta in 2025

Related Information

Tools Used The smaller, reusable components that this agent can utilize to perform repetitive tasks without using GenAI.

JDBC Connector
Connector enabling database connection for execution and data retrieval across Snowflake, Postgres, and OpenSearch.
Entity Extraction
Identifies key entities in question using such as synonyms and list of values of table columns
Error Logger
Captures, stores, and reports agent errors for debugging, monitoring, and compliance tracking.

Associated Engines The working examples of how to use this agents to solve a commercial business problem.

Additional Resources

Access developer information and get in touch with our team

Dive into the code details
Follow this link to access API documentation for this agent.
Ready to start building?
Reach out to the OdyssAI team via our intake form.