
{"id":8285,"date":"2025-09-30T08:32:52","date_gmt":"2025-09-30T07:32:52","guid":{"rendered":"https:\/\/dasini.net\/blog\/?p=8285"},"modified":"2025-10-07T09:01:06","modified_gmt":"2025-10-07T08:01:06","slug":"ask-your-database-anything-natural-language-to-sql-in-mysql-heatwave","status":"publish","type":"post","link":"https:\/\/dasini.net\/blog\/2025\/09\/30\/ask-your-database-anything-natural-language-to-sql-in-mysql-heatwave\/","title":{"rendered":"Ask Your Database Anything: Natural Language to SQL in MySQL HeatWave"},"content":{"rendered":"\n<p>The ability to query data efficiently has always been central to unlocking insights, but writing SQL can be a barrier for many users who aren\u2019t fluent in the language of databases. Analysts, product managers, and business users often know the questions they want to ask\u2014just not how to express them in SQL. With the rise of large language models (LLMs) and advancements in database technology, that gap is closing quickly.<\/p>\n\n\n\n<p><strong>MySQL HeatWave<\/strong> now brings <strong>Natural Language to SQL (NL2SQL)<\/strong> capabilities directly into the database engine, allowing users to generate SQL queries from plain English statements. Instead of wrestling with complex joins, filters, or aggregate functions, users can simply type a natural-language request\u2014such as <em>\u201cShow me the top 10 products by revenue this quarter\u201d<\/em>\u2014and HeatWave automatically translates it into an SQL query.<\/p>\n\n\n\n<p>In this article, we\u2019ll explore <strong>how to leverage LLM-powered NL2SQL in MySQL HeatWave<\/strong>, walk through practical examples, and show how this feature empowers both technical and non-technical users to interact with data more intuitively.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69e8c625a6f8a&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69e8c625a6f8a\" class=\"aligncenter size-full wp-lightbox-container\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"551\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/09\/nl2sql_smaller.png?resize=700%2C551&#038;ssl=1\" alt=\"\" class=\"wp-image-8364\" style=\"object-fit:cover\" srcset=\"https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/09\/nl2sql_smaller.png?w=700&amp;ssl=1 700w, https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/09\/nl2sql_smaller.png?resize=300%2C236&amp;ssl=1 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Agrandir\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Context<\/h2>\n\n\n\n<p>I&rsquo;m using <a href=\"https:\/\/www.oracle.com\/heatwave\/\" target=\"_blank\" rel=\"noopener\" title=\"MySQL HeatWave\"><strong>MySQL HeatWave<\/strong><\/a> <strong>9.4.1<\/strong> on <a href=\"https:\/\/www.oracle.com\/cloud\/\" target=\"_blank\" rel=\"noopener\" title=\"Oracle Cloud Infrastructure\">Oracle Cloud Infrastructure<\/a> (OCI):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql\">SQL&gt; \n-- HeatWave MySQL server version\nSHOW VARIABLES WHERE Variable_name IN ('version_comment', 'version');\n+-----------------+--------------------------+\n| Variable_name   | Value                    |\n+-----------------+--------------------------+\n| version         | 9.4.1-cloud              |\n| version_comment | MySQL Enterprise - Cloud |\n+-----------------+--------------------------+\n<\/code><\/pre>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Furthermore, I&rsquo;m using a modified version (available on my <a href=\"https:\/\/github.com\/freshdaz\/MySQL_HeatWave_NL2SQL\" target=\"_blank\" rel=\"noopener\" title=\"\">GitHub account<\/a>) of the well-known <a href=\"https:\/\/dev.mysql.com\/doc\/world-setup\/en\/\" target=\"_blank\" rel=\"noopener\" title=\"Setting Up the world Database\"><em><strong>World database<\/strong><\/em><\/a>. Although the data hasn\u2019t been updated in some time, it still serves as a useful tool for visualizing the results of SQL queries.<\/p>\n\n\n\n<p>Here the schema:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql\">CREATE TABLE `country` (\n  `code` char(3) NOT NULL DEFAULT '' COMMENT 'Primary key: three-letter country code (ISO standard).',\n  `country_name` char(52) NOT NULL DEFAULT '' COMMENT 'Official name of the country.',\n  `continent` enum('Asia','Europe','North America','Africa','Oceania','Antarctica','South America') NOT NULL DEFAULT 'Asia' COMMENT 'Continent where the country is located.',\n  `region` char(26) NOT NULL DEFAULT '' COMMENT 'Geographical region within the continent.',\n  `surface_area` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT 'Total surface area of the country in square kilometers.',\n  `independance_year` smallint DEFAULT NULL COMMENT 'Year the country achieved independence (NULL if unknown).',\n  `country_population` int NOT NULL DEFAULT '0' COMMENT 'Total population of the country.',\n  `life_expectancy` decimal(3,1) DEFAULT NULL COMMENT 'Average life expectancy of the population in years.',\n  `GNP` decimal(10,2) DEFAULT NULL COMMENT 'Gross National Product of the country in millions of USD.',\n  `GNPOld` decimal(10,2) DEFAULT NULL COMMENT 'Gross National Product in an earlier year for comparison.',\n  `local_name` char(45) NOT NULL DEFAULT '' COMMENT 'The country\u2019s name in its local language.',\n  `government_form` char(45) NOT NULL DEFAULT '' COMMENT 'Description of the form of government (e.g., Republic, Monarchy).',\n  `head_of_state` char(60) DEFAULT NULL COMMENT 'Name of the current head of state (e.g., President, Monarch).',\n  `ID_capital` int DEFAULT NULL COMMENT 'ID of the capital city (foreign key reference to city table).',\n  `code2` char(2) NOT NULL DEFAULT '' COMMENT 'Two-letter country code (ISO standard).',\n  PRIMARY KEY (`code`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Stores detailed information about countries, including identifiers, demographics, economy, and government structure.'\n;\n\n\nCREATE TABLE `country_language` (\n  `country_code` char(3) NOT NULL DEFAULT '' COMMENT 'Three-letter country code referencing the country table. First part of the composite primary key.',\n  `language` char(30) NOT NULL DEFAULT '' COMMENT 'Name of the language spoken in the country. Second part of the composite primary key.',\n  `is_official` enum('T','F') NOT NULL DEFAULT 'F' COMMENT 'Indicates whether the language is an official language of the country (T = true, F = false).',\n  `percentage` decimal(4,1) NOT NULL DEFAULT '0.0' COMMENT 'Percentage of the country\u2019s population that speaks this language.',\n  PRIMARY KEY (`country_code`,`language`),\n  KEY `country_code` (`country_code`),\n  CONSTRAINT `country_language_ibfk_1` FOREIGN KEY (`country_code`) REFERENCES `country` (`code`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Stores information about the languages spoken in each country, including whether they are official and the share of the population using them.'\n;\n\n\nCREATE TABLE `city` (\n  `ID_city` int NOT NULL AUTO_INCREMENT COMMENT 'Primary key: integer that uniquely identifies each city.',\n  `city_name` char(35) NOT NULL DEFAULT '' COMMENT 'Name of the city.',\n  `country_code` char(3) NOT NULL DEFAULT '' COMMENT 'Three-letter country code referencing the country table.',\n  `district` char(20) NOT NULL DEFAULT '' COMMENT 'District or administrative region where the city is located.',\n  `city_population` int NOT NULL DEFAULT '0' COMMENT 'Population count of the city.',\n  PRIMARY KEY (`ID_city`),\n  KEY `country_code` (`country_code`),\n  CONSTRAINT `city_ibfk_1` FOREIGN KEY (`country_code`) REFERENCES `country` (`code`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Stores information about cities, including their name, country, district, and population.'\n;<\/code><\/pre>\n\n\n\n<p>As you can see, the main difference from the original version is that I embedded the documentation directly into the tables using <em><code>COMMENT<\/code><\/em> clauses. In addition, some column names have been renamed. The goal is to capture as much relevant information as possible to provide business context. This contextual information will then be used to <em><strong>augment<\/strong><\/em> the LLM.<\/p>\n\n\n\n<p>Let&rsquo;s run 3 queries on the data set:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"SQL\" class=\"language-SQL\">MySQL&gt;\n-- Find the name, country code and the district of the city with ID 2989\n\nSELECT city_name, country_code, district \nFROM city \nWHERE ID_city = 2989;\n+-----------+--------------+-------------+\n| city_name | country_code | district    |\n+-----------+--------------+-------------+\n| Grenoble  | FRA          | Rh\u00f4ne-Alpes |\n+-----------+--------------+-------------+\n \n \n-- Find the government form of Germany\n\nSELECT government_form\nFROM country\nWHERE code = 'FRA';\n+-----------------+\n| government_form |\n+-----------------+\n| Republic        |\n+-----------------+\n\n\n-- List all official languages spoken in Canada\n\nSELECT language\nFROM country_language\nWHERE country_code = 'CAN' AND is_official = 'T';\n+----------+\n| language |\n+----------+\n| English  |\n| French   |\n+----------+<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>These queries are fairly simple, but they still require some SQL skills. What if you could write in plain English and have MySQL HeatWave understand you? <br>This is now possible with the <code><em><strong><a href=\"https:\/\/dev.mysql.com\/doc\/heatwave\/en\/mys-hwgenai-nl-sql.html\" target=\"_blank\" rel=\"noopener\" title=\"Generates SQL queries using natural-language statement with MySQL HeatWave\">NL_SQL<\/a><\/strong><\/em><\/code> routine, which generates and executes SQL queries directly from natural language statements.<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Generate SQL Queries From Natural-Language Statements<\/h2>\n\n\n\n<p>Starting with MySQL HeatWave <strong>9.4.1<\/strong>, <a href=\"https:\/\/www.oracle.com\/heatwave\/genai\/\" target=\"_blank\" rel=\"noopener\" title=\"Oracle MySQL HeatWave GenAI provides integrated, automated, and secure gen AI with in-database LLMs\">MySQL HeatWave GenAI<\/a> (on <a href=\"https:\/\/www.oracle.com\/heatwave\/\" target=\"_blank\" rel=\"noopener\" title=\"MySQL HeatWave on OCI\">OCI<\/a>, <a href=\"https:\/\/www.oracle.com\/developer\/getting-started-with-heatwave-on-aws\/\" target=\"_blank\" rel=\"noopener\" title=\"Getting Started with MySQL HeatWave on AWS\">AWS<\/a>, and <a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/database-for-azure-provision\/odsa-provisioning-mysql-heatwave.html\" target=\"_blank\" rel=\"noopener\" title=\"provision Oracle MySQL HeatWave in OracleDB for Azure,\">Azure<\/a>) allows you with the&nbsp;<code><em><strong><a href=\"https:\/\/dev.mysql.com\/doc\/heatwave\/en\/mys-hwgenai-nl-sql.html\" target=\"_blank\" rel=\"noreferrer noopener\">NL_SQL<\/a><\/strong><\/em><\/code>&nbsp;stored procedure, to <strong>generate SQL queries directly from natural language<\/strong>, making it easier to interact with your databases. <\/p>\n\n\n\n<p>The feature gathers information about the schemas, tables, and columns you have access to, then leverages a Large Language Model to generate an appropriate SQL query based on your request. You can also execute the generated query and view the results instantly.<\/p>\n\n\n\n<p>Using nl_sql is quite simple:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql\">CALL sys.NL_SQL(\"<em>NaturalLanguageStatement<\/em>\",<strong><em>@output<\/em><\/strong>, JSON_OBJECT('schemas',JSON_ARRAY('<em>DBName<\/em>'),'model_id','<em>ModelID<\/em>'));<\/code><\/pre>\n\n\n\n<p>Replace the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><em><code><strong>NaturalLanguageStatement<\/strong><\/code><\/em>: natural-language statement. It can be a question, statement, or query pertaining to your data available in MySQL HeatWave.<\/li>\n\n\n\n<li><em><code><strong>DBName<\/strong><\/code><\/em>: database to consider for generating and running the SQL query.<\/li>\n\n\n\n<li><em><code><strong>ModelID<\/strong><\/code><\/em>: LLM to use.<\/li>\n<\/ul>\n\n\n\n<p>You can find additional information <a href=\"https:\/\/dev.mysql.com\/doc\/heatwave\/en\/mys-hw-genai-nl-sql.html\" target=\"_blank\" rel=\"noopener\" title=\"\">here<\/a>.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Also as of MySQL HeatWave 9.3.2, you can view the list of available Large Language Models and embedding models directly from the database using the <em><strong><code>sys.ML_SUPPORTED_LLMS<\/code><\/strong><\/em> view. This enhancement, part of the <strong>MySQL HeatWave GenAI<\/strong> feature, allows you to stay current with the available models, including in-database models and those from external services like<strong> <a href=\"https:\/\/www.oracle.com\/artificial-intelligence\/generative-ai\/generative-ai-service\/\" target=\"_blank\" rel=\"noopener\" title=\"OCI Generative AI Service\">Oracle Cloud Infrastructure (OCI) Generative AI<\/a><\/strong>.<\/p>\n\n\n\n<p>To display the list of supported content generation LLMs and their provider, you can use the following simple query:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql\">MySQL&gt; \nSELECT model_id, provider \nFROM sys.ML_SUPPORTED_LLMS \nWHERE capabilities LIKE '[\"GENERATION\"]';\n+-------------------------------+---------------------------+\n| model_id                      | provider                  |\n+-------------------------------+---------------------------+\n| llama2-7b-v1                  | HeatWave                  |\n| llama3-8b-instruct-v1         | HeatWave                  |\n| llama3.1-8b-instruct-v1       | HeatWave                  |\n| llama3.2-1b-instruct-v1       | HeatWave                  |\n| llama3.2-3b-instruct-v1       | HeatWave                  |\n| mistral-7b-instruct-v1        | HeatWave                  |\n| mistral-7b-instruct-v3        | HeatWave                  |\n| cohere.command-latest         | OCI Generative AI Service |\n| cohere.command-plus-latest    | OCI Generative AI Service |\n| cohere.command-a-03-2025      | OCI Generative AI Service |\n| meta.llama-3.3-70b-instruct   | OCI Generative AI Service |\n| cohere.command-r-08-2024      | OCI Generative AI Service |\n| cohere.command-r-plus-08-2024 | OCI Generative AI Service |\n+-------------------------------+---------------------------+<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>We can see here, the in-MySQL HeatWave models (provider HeatWave) as well as Oracle Cloud Infrastructure Generative AI service models (provider OCI Generative AI Service).<\/p>\n\n\n\n<pre class=\"wp-block-verse\"><em>To view or use the OCI Generative AI Service models in this list, you need to enable the database system to access OCI services. For more information, see&nbsp;<a href=\"https:\/\/dev.mysql.com\/doc\/heatwave\/en\/mys-hw-genai-authenticate-service.html\" target=\"_blank\" rel=\"noopener\" title=\"Authenticate OCI Generative AI Service\">Authenticate OCI Generative AI Service<\/a>.<\/em><\/pre>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>When using the <code><strong>sys.NL_SQL<\/strong><\/code> routine in MySQL HeatWave, you have several options for the underlying (LLM) that translates your natural language queries into SQL. <br>The available models are part of the <strong>MySQL HeatWave GenAI<\/strong> feature. You can select from in-database models or, like we have seen above, if your environment is configured for it, models from the Oracle Cloud Infrastructure (OCI) Generative AI Service.<\/p>\n\n\n\n<p>In <strong>MySQL HeatWave 9.4.1<\/strong>, some of the available models for natural language to SQL tasks include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>meta.llama-3.3-70b-instruct<\/code><\/strong> (OCI Generative AI Service)<\/li>\n\n\n\n<li><strong><code>llama3.1-8b-instruct-v1<\/code><\/strong> (In-database HeatWave)<\/li>\n\n\n\n<li><strong><code>llama3.2-3b-instruct-v1<\/code><\/strong> (In-database HeatWave)<\/li>\n<\/ul>\n\n\n\n<p>The specific models available may vary by MySQL HeatWave version and the cloud service region you are using. To get the most current list, don&rsquo;t forget that you can always query the <code><strong>sys.ML_SUPPORTED_LLMS<\/strong><\/code> view.<\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What Can I Ask My Database? Example Queries<\/strong><\/h2>\n\n\n\n<p>Now, let&rsquo;s see how it works in action. We&rsquo;ll start with our earlier queries and then try out a few new ones.<\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\"><strong>Find the name, country code and the district of the city with ID 2989<\/strong><\/span>:<\/p>\n\n\n\n<pre title=\"NL_SQL with llama3.2-3b-instruct-v1\" class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql\">MySQL&gt; SET @nlq = \"Find the name, country code and the district of the city with ID 2989\";\nQuery OK, 0 rows affected (0.0004 sec)\n\nMySQL&gt; CALL sys.NL_SQL(@nlq, @output, '{\"model_id\": \"llama3.2-3b-instruct-v1\", \"schemas\":[\"nl2sql_world\"]}');\n+--------------------------------------------------------------------------------------------------+\n| Executing generated SQL statement...                                                             |\n+--------------------------------------------------------------------------------------------------+\n| SELECT `city_name`, `country_code`, `district` FROM `nl2sql_world`.`city` WHERE `ID_city` = 2989 |\n+--------------------------------------------------------------------------------------------------+\n1 row in set (3.7089 sec)\n\n+-----------+--------------+-------------+\n| city_name | country_code | district    |\n+-----------+--------------+-------------+\n| Grenoble  | FRA          | Rh\u00f4ne-Alpes |\n+-----------+--------------+-------------+\n1 row in set (3.7089 sec)<\/code><\/pre>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong><span style=\"text-decoration: underline;\">Find the government form of Germany<\/span><\/strong>:<\/p>\n\n\n\n<pre title=\"NL_SQL with llama3.1-8b-instruct-v1\" class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql\">MySQL&gt; SET @nlq = \"Find the government form of Germany\";\nQuery OK, 0 rows affected (0.0003 sec)\n\nMySQL&gt; CALL sys.NL_SQL(@nlq, @output, '{\"model_id\": \"llama3.1-8b-instruct-v1\", \"schemas\":[\"nl2sql_world\"]}');\n+-----------------------------------------------------------------------------+\n| Executing generated SQL statement...                                        |\n+-----------------------------------------------------------------------------+\n| SELECT `government_form` FROM `nl2sql_world`.`country` WHERE `code` = 'DEU' |\n+-----------------------------------------------------------------------------+\n1 row in set (4.0998 sec)\n\n+------------------+\n| government_form  |\n+------------------+\n| Federal Republic |\n+------------------+\n1 row in set (4.0998 sec)<\/code><\/pre>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong><span style=\"text-decoration: underline;\">List all official languages spoken in Canada<\/span><\/strong>:<\/p>\n\n\n\n<pre title=\"NL_SQL with meta.llama-3.3-70b-instruct\" class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql\">MySQL&gt; SET @nlq = \"Find the top 5 most populated cities in the world\";\nQuery OK, 0 rows affected (0.0002 sec)\n\nMySQL&gt; CALL sys.NL_SQL(@nlq, @output, '{\"model_id\": \"meta.llama-3.3-70b-instruct\", \"schemas\":[\"nl2sql_world\"]}');\n+----------------------------------------------------------------------------------------------------------+\n| Executing generated SQL statement...                                                                     |\n+----------------------------------------------------------------------------------------------------------+\n| SELECT `city_name`, `city_population` FROM `nl2sql_world`.`city` ORDER BY `city_population` DESC LIMIT 5 |\n+----------------------------------------------------------------------------------------------------------+\n1 row in set (2.6276 sec)\n\n+-----------------+-----------------+\n| city_name       | city_population |\n+-----------------+-----------------+\n| Mumbai (Bombay) |        10500000 |\n| Seoul           |         9981619 |\n| S\u00e3o Paulo       |         9968485 |\n| Shanghai        |         9696300 |\n| Jakarta         |         9604900 |\n+-----------------+-----------------+\n5 rows in set (2.6276 sec)<\/code><\/pre>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><span style=\"text-decoration: underline;\"><strong>Find the top 10 most multilingual countries (by number of languages spoken)<\/strong><\/span>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql\">MySQL&gt; SET @nlq = \"Find the top 10 most multilingual countries (by number of languages spoken)\";\nQuery OK, 0 rows affected (0.0004 sec)\n\nMySQL&gt; CALL sys.NL_SQL(@nlq, @output, '{\"model_id\": \"meta.llama-3.3-70b-instruct\", \"schemas\":[\"nl2sql_world\"]}');\n+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| Executing generated SQL statement...                                                                                                                                                                                                                        |\n+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| SELECT `T1`.`country_name`, COUNT(`T2`.`language`) AS `num_languages` FROM `nl2sql_world`.`country` AS `T1` JOIN `nl2sql_world`.`country_language` AS `T2` ON `T1`.`code` = `T2`.`country_code` GROUP BY `T1`.`code` ORDER BY `num_languages` DESC LIMIT 10 |\n+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n1 row in set (5.8831 sec)\n\n+--------------------+---------------+\n| country_name       | num_languages |\n+--------------------+---------------+\n| United States      |            12 |\n| China              |            12 |\n| India              |            12 |\n| Canada             |            12 |\n| Russian Federation |            12 |\n| Tanzania           |            11 |\n| South Africa       |            11 |\n| Philippines        |            10 |\n| Iran               |            10 |\n| Kenya              |            10 |\n+--------------------+---------------+\n10 rows in set (5.8831 sec)<\/code><\/pre>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong><span style=\"text-decoration: underline;\">List all official languages spoken in Canada<\/span><\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"SQL\" class=\"language-SQL\">MySQL&gt; SET @nlq = \"List all official languages spoken in Canada\";\nQuery OK, 0 rows affected (0.0003 sec)\n\nMySQL&gt; CALL sys.NL_SQL(@nlq, @output, '{\"model_id\": \"llama3.2-3b-instruct-v1\", \"schemas\":[\"nl2sql_world\"]}');\n+------------------------------------------------------------------------------------------------------------------+\n| Executing generated SQL statement...                                                                             |\n+------------------------------------------------------------------------------------------------------------------+\n| SELECT `language` FROM `nl2sql_world`.`country_language` WHERE `is_official` = 'T' AND `country_code` IN ('CAN') |\n+------------------------------------------------------------------------------------------------------------------+\n1 row in set (3.0730 sec)\n\n+----------+\n| language |\n+----------+\n| English  |\n| French   |\n+----------+\n2 rows in set (3.0730 sec)<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Pretty impressive, isn&rsquo;t it? \ud83d\ude42 <\/p>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69e8c625a78bd&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69e8c625a78bd\" class=\"wp-block-image size-full wp-lightbox-container\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"2048\" height=\"1152\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/09\/nl2sql-demo3.gif?resize=2048%2C1152&#038;ssl=1\" alt=\"\" class=\"wp-image-8373\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Agrandir\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<p class=\"has-small-font-size\"><em>Click the picture to enlarge<\/em><\/p>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong><span style=\"text-decoration: underline;\">A word of caution<\/span>:<\/strong> Natural Language to SQL is not foolproof. The LLM can make mistakes and may generate an incorrect query. Additionally, while there are no guarantees, a larger number of model parameters (the <code>b<\/code> in <code>70b<\/code>) typically leads to better results.<\/p>\n\n\n\n<p>The next section will discuss key considerations for ensuring optimal performance and accuracy when using the <code>sys.NL_SQL<\/code> routine.<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Getting the Best Results from Natural Language to SQL<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Best Practices for Optimal Results<\/h3>\n\n\n\n<p>To get the most out of the <strong>NL_SQL<\/strong> feature, follow these best practices for generating accurate and efficient queries:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Provide Specific Context:<\/strong> Help the LLM by restricting its focus. Use the <code>schemas<\/code> and <code>tables<\/code> parameters to specify only the relevant schemas or tables for your query.<\/li>\n\n\n\n<li><strong>Use Descriptive Names:<\/strong> Ensure your tables, columns, and views have clear, semantically meaningful names. Using descriptive views is especially helpful for improving the accuracy of complex <code>JOIN<\/code> operations.<\/li>\n\n\n\n<li><strong>Be Specific with Values:<\/strong> To avoid errors, provide exact values in your natural language input, rather than vague descriptions.<\/li>\n<\/ul>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"has-vivid-green-cyan-color has-black-background-color has-text-color has-background has-link-color wp-elements-e8843de35aaaad4ba617045a583bef7e\">Ready to move from concept to code? See the practical use case where an AI DBA Assistant significantly simplifies your query generation workflow in the article, <a href=\"https:\/\/dasini.net\/blog\/2025\/10\/07\/let-your-ai-dba-assistant-write-your-mysql-queries\/\" target=\"_blank\" rel=\"noopener\" title=\"Let Your AI DBA Assistant Write Your MySQL Queries\"><strong><em>Let Your AI DBA Assistant Write Your MySQL Queries<\/em><\/strong><\/a><\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Important Limitations and Considerations<\/h3>\n\n\n\n<p>While powerful, the <strong>NL_SQL<\/strong> feature does have a few limitations to keep in mind:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Query Accuracy:<\/strong> The generated SQL may not always be perfectly valid or optimal. Always review the output before executing it.<\/li>\n\n\n\n<li><strong>Performance:<\/strong> Generated queries can sometimes be complex, leading to unpredictable execution times and potentially large result sets that consume excessive resources.<\/li>\n\n\n\n<li><strong>Stateless Operations:<\/strong> The feature does not maintain the state of previous calls. Each invocation is independent and does not learn from prior interactions.<\/li>\n\n\n\n<li><strong>Metadata Volume:<\/strong> Accuracy can decrease if the database contains a large amount of metadata, as this can confuse the LLM.<\/li>\n\n\n\n<li><strong>Unsupported Features:<\/strong> The <code>NL_SQL<\/code> routine does not support temporary tables.<\/li>\n<\/ul>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Peroraison<\/h2>\n\n\n\n<p>With the <strong>Natural Language to SQL<\/strong> feature in <strong>MySQL HeatWave<\/strong>, we&rsquo;re witnessing a major shift in how we interact with databases. This technology empowers a broader range of users\u2014from business analysts to product managers\u2014to access and analyze data without needing deep SQL expertise. By simply using plain English, anyone can now translate a business question into an executable SQL query. This not only democratizes data access but also significantly accelerates the time from question to insight.<\/p>\n\n\n\n<p>The <code><strong>sys.NL_SQL<\/strong><\/code> routine, backed by powerful LLMs, is a testament to the seamless integration of generative AI into core database services. While it&rsquo;s not a silver bullet\u2014and requires careful consideration of best practices like providing context and using descriptive names\u2014it marks a fundamental step toward making data more accessible and intuitive. <\/p>\n\n\n\n<p>By providing a bridge between human language and database queries, <strong>MySQL HeatWave<\/strong> is not just helping us write code; it&rsquo;s enabling us to ask our databases anything, paving the way for a more natural and productive relationship with our data.<\/p>\n\n\n\n<p>With the <code><strong>sys.NL_SQL<\/strong><\/code> routine, asking questions of your database has never been more natural.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69e8c625a7ed9&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69e8c625a7ed9\" class=\"aligncenter size-full is-resized wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"770\" height=\"550\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/09\/rc24-heatwave-logo.gif?fit=770%2C550&amp;ssl=1\" alt=\"\" class=\"wp-image-8340\" style=\"width:400px\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Agrandir\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Resources<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/dasini.net\/blog\/2025\/10\/07\/let-your-ai-dba-assistant-write-your-mysql-queries\/\" target=\"_blank\" rel=\"noopener\" title=\"Let Your AI DBA Assistant Write Your MySQL Queries\">Let Your AI DBA Assistant Write Your MySQL Queries<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/blogs.oracle.com\/mysql\/post\/introducing-natural-language-to-sql-for-mysql-heatwave\" target=\"_blank\" rel=\"noopener\" title=\"Introducing Natural Language to SQL for MySQL HeatWave\">Introducing Natural Language to SQL for MySQL HeatWave<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/dev.mysql.com\/doc\/heatwave\/en\/mys-hw-genai-nl-sql.html\" target=\"_blank\" rel=\"noopener\" title=\"Generate SQL Queries From Natural-Language Statements\">Generate SQL Queries From Natural-Language Statements<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/dev.mysql.com\/doc\/heatwave\/en\/mys-hwgenai-nl-sql.html\" target=\"_blank\" rel=\"noopener\" title=\"MySQL HeatWave NL_SQL\">NL_SQL<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/dev.mysql.com\/doc\/heatwave\/en\/mys-hw-genai-supported-models.html\" target=\"_blank\" rel=\"noopener\" title=\"MySQL HeatWave GenAI Supported Models and Languages\">MySQL HeatWave GenAI Supported Models and Languages<\/a><\/li>\n<\/ul>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><a href=\"https:\/\/www.linkedin.com\/groups\/12524512\/\" target=\"_blank\" rel=\"noopener\" title=\"Olivier DASINI on Linkedin\">Follow me on Linkedin<\/a><\/p>\n\n\n\n<p>Watch my videos on my <a href=\"https:\/\/www.youtube.com\/channel\/UC12TulyJsJZHoCmby3Nm3WQ\" target=\"_blank\" rel=\"noreferrer noopener\" title=\"Olivier's MySQL Channel\">YouTube channel<\/a> and <a href=\"https:\/\/www.youtube.com\/channel\/UC12TulyJsJZHoCmby3Nm3WQ\/?sub_confirmation=1\" target=\"_blank\" rel=\"noreferrer noopener\" title=\"Subscribe\">subscribe<\/a>.<\/p>\n\n\n\n<p>My <a href=\"https:\/\/www.slideshare.net\/freshdaz\" target=\"_blank\" rel=\"noreferrer noopener\" title=\"Olivier DASINI on Slideshare\">Slideshare account<\/a>.<\/p>\n\n\n\n<p>My <a href=\"https:\/\/speakerdeck.com\/freshdaz\/\" target=\"_blank\" rel=\"noreferrer noopener\" title=\"Olivier DASINI on Speaker Deck\">Speaker Deck account<\/a>.<\/p>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"has-vivid-red-color has-text-color\"><strong>Thanks for using HeatWave &amp; MySQL!<\/strong><\/p>\n\n\n\n<p><\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Natural Language to SQL in MySQL HeatWave makes data accessible to everyone, not just SQL experts. By turning plain English into optimized queries, it removes barriers and speeds up insights. While best practices help ensure accuracy, the feature already shows how LLMs are transforming the way we work with data. With the NL_SQL routine, asking your database questions is as simple as asking a colleague.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"categories":[1702,1740,1694,203],"tags":[1700,1697,1756],"class_list":["post-8285","post","type-post","status-publish","format-standard","hentry","category-ai","category-artificial-intelligence","category-heatwave-en","category-mysql-en","tag-genai","tag-heatwave-fr-en","tag-nl2sql"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9LfWW-29D","jetpack-related-posts":[{"id":8393,"url":"https:\/\/dasini.net\/blog\/2025\/10\/07\/let-your-ai-dba-assistant-write-your-mysql-queries\/","url_meta":{"origin":8285,"position":0},"title":"Let Your AI DBA Assistant Write Your MySQL Queries","author":"Olivier DASINI","date":"7 octobre 2025","format":false,"excerpt":"Having explored the innovative MySQL HeatWave technology that converts Natural Language into SQL (Ask Your Database Anything: Natural Language to SQL in MySQL HeatWave), our next article in this series, dives into a practical use case demonstrating how an AI DBA Assistant can significantly simplify your query generation workflow. In\u2026","rel":"","context":"Dans &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/dasini.net\/blog\/category\/ai\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/10\/reltime_monitor.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/10\/reltime_monitor.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/10\/reltime_monitor.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/10\/reltime_monitor.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":8442,"url":"https:\/\/dasini.net\/blog\/2025\/10\/14\/querying-the-unstructured-natural-language-to-sql-for-json-data\/","url_meta":{"origin":8285,"position":1},"title":"Querying the Unstructured: Natural Language to SQL for JSON Data","author":"Olivier DASINI","date":"14 octobre 2025","format":false,"excerpt":"Bridging natural language processing with semi-structured data brings both opportunity and complexity. MySQL HeatWave GenAI\u2019s NL2SQL feature shows how natural language can simplify data interaction \u2014 even for JSON documents. Yet, because JSON embeds both data and metadata within a single column, LLMs may struggle without explicit schema cues. By\u2026","rel":"","context":"Dans &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/dasini.net\/blog\/category\/ai\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/10\/Querying-the-Unstructured-Natural-Language-to-SQL-for-JSON-Data-400.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":7812,"url":"https:\/\/dasini.net\/blog\/2025\/05\/13\/oracle-dev-days-2025-french-edition\/","url_meta":{"origin":8285,"position":2},"title":"Oracle Dev Days 2025 \u2013 French Edition","author":"Olivier DASINI","date":"13 mai 2025","format":false,"excerpt":"Join the Oracle Dev Days \u2013 French Edition, from May 20 to 22, 2025! This must-attend event (in French) offers a rich program exploring the latest advancements in AI, databases, cloud, and Java. Join me on May 21 at 2:00 PM for the day dedicated to \u201cDatabase & AI.\u201d I\u2019ll\u2026","rel":"","context":"Dans &quot;Conf\u00e9rence&quot;","block_context":{"text":"Conf\u00e9rence","link":"https:\/\/dasini.net\/blog\/category\/conference-en\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/05\/Olivier_Dasini_HeatWave.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/05\/Olivier_Dasini_HeatWave.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/05\/Olivier_Dasini_HeatWave.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/05\/Olivier_Dasini_HeatWave.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/05\/Olivier_Dasini_HeatWave.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":7252,"url":"https:\/\/dasini.net\/blog\/2025\/02\/11\/building-an-interactive-llm-chatbot-with-heatwave-using-python\/","url_meta":{"origin":8285,"position":3},"title":"Building an Interactive LLM Chatbot with  HeatWave Using Python","author":"Olivier DASINI","date":"11 f\u00e9vrier 2025","format":false,"excerpt":"AI-powered applications require robust and scalable database solutions to manage and process large amounts of data efficiently. HeatWave is an excellent choice for such applications, providing high-performance OLTP, analytics, machine learning and generative artificial intelligence capabilities. In this article, we will explore a Python 3 script that connects to an\u2026","rel":"","context":"Dans &quot;HeatWave&quot;","block_context":{"text":"HeatWave","link":"https:\/\/dasini.net\/blog\/category\/heatwave-en\/"},"img":{"alt_text":"simple but robust chatbot system leveraging HeatWave GenAI and its in-database Mistral LLM","src":"https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/02\/HW-Chat-mistral-7b.gif?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/02\/HW-Chat-mistral-7b.gif?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/02\/HW-Chat-mistral-7b.gif?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/02\/HW-Chat-mistral-7b.gif?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/02\/HW-Chat-mistral-7b.gif?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":6752,"url":"https:\/\/dasini.net\/blog\/2024\/08\/07\/heatwave-genai-your-ai-powered-content-creation-partner\/","url_meta":{"origin":8285,"position":4},"title":"HeatWave GenAI: Your AI-Powered Content Creation Partner","author":"Olivier DASINI","date":"7 ao\u00fbt 2024","format":false,"excerpt":"Generative artificial intelligence (GenAI) is reshaping the content creation landscape. By training on vast datasets, these \"intelligent\" systems can produce new, human-quality content across a multitude of domains. Oracle's HeatWave GenAI (starting with version 9.0.1) is at the forefront of this revolution, offering an integrated platform that combines in-database large\u2026","rel":"","context":"Dans &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/dasini.net\/blog\/category\/ai\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2024\/07\/hw_product_image.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2024\/07\/hw_product_image.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2024\/07\/hw_product_image.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2024\/07\/hw_product_image.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2024\/07\/hw_product_image.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2024\/07\/hw_product_image.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":7363,"url":"https:\/\/dasini.net\/blog\/2025\/03\/13\/build-an-ai-powered-search-engine-with-heatwave-genai-part-1\/","url_meta":{"origin":8285,"position":5},"title":"Build an AI-Powered Search Engine with HeatWave GenAI (part 1)","author":"Olivier DASINI","date":"13 mars 2025","format":false,"excerpt":"Discover how to build an AI-powered search engine for your applications using HeatWave GenAI. This approach leverages large language models (LLMs) for semantic search, offering a smarter alternative to traditional SQL and full-text search methods. By using embeddings\u2014vector representations of words\u2014the search engine understands context and intent, delivering more relevant\u2026","rel":"","context":"Dans &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/dasini.net\/blog\/category\/ai\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/03\/HW_GenaI_search_engine.gif?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/03\/HW_GenaI_search_engine.gif?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/03\/HW_GenaI_search_engine.gif?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/03\/HW_GenaI_search_engine.gif?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/03\/HW_GenaI_search_engine.gif?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/dasini.net\/blog\/wp-content\/uploads\/2025\/03\/HW_GenaI_search_engine.gif?resize=1400%2C800&ssl=1 4x"},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/dasini.net\/blog\/wp-json\/wp\/v2\/posts\/8285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dasini.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dasini.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dasini.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dasini.net\/blog\/wp-json\/wp\/v2\/comments?post=8285"}],"version-history":[{"count":108,"href":"https:\/\/dasini.net\/blog\/wp-json\/wp\/v2\/posts\/8285\/revisions"}],"predecessor-version":[{"id":8440,"href":"https:\/\/dasini.net\/blog\/wp-json\/wp\/v2\/posts\/8285\/revisions\/8440"}],"wp:attachment":[{"href":"https:\/\/dasini.net\/blog\/wp-json\/wp\/v2\/media?parent=8285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dasini.net\/blog\/wp-json\/wp\/v2\/categories?post=8285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dasini.net\/blog\/wp-json\/wp\/v2\/tags?post=8285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}