![]() ![]() So if we were to naively pass in all the data to ground the LLM in reality, we would likely run into this issue.Ī third issue is a more basic one: sometimes the LLM just messes up. This is relevant because SQL databases often contain a lot of information. LLMs have some context window which limits the amount of text they can operate over. However, this runs into a second issue - the context window length. ![]() The main idea to fix this (we will go into more detail below) is to provide the LLM with knowledge about what actually exists in the database and tell it to write a SQL query consistent with that. So one of the big challenges we face is how to ground the LLM in reality so that it produces valid SQL. LLMs can write SQL, but they are often prone to making up tables, making up fields, and generally just writing SQL that if executed against your database would not actually be valid. The main issue that exists is hallucination. So LLMs can write SQL - what more is needed? However, there are several issues that make this a non-trivial task. LLMs have an understanding of SQL and are able to write it pretty well. But what if you could just interact with a SQL database in natural language? With LLMs today, that is possible. With the amount of valuable data stored there, business intelligence (BI) tools that make it easy to query and understand the data present there have risen in popularity. Most of an enterprise’s data is traditionally stored in SQL databases. The LangChain library has multiple SQL chains and even an SQL agent aimed at making interacting with data stored in SQL as easy as possible. This webinar will be on March 22nd - sign up at the below link: We’re even more excited to announce that we’ll be doing an hour long webinar with them to discuss these learnings and field other related questions. We’re really excited to write this blog post with them going over all the tips and tricks they’ve learned doing so. 8 min read Photo by Kaleidico / Unsplashįrancisco Ingham and Jon Luo are two of the community members leading the change on the SQL integrations.In short, picture a solution that fits your budget and you are comfortable with. Also, given a DDL script from DB2, ORACLE or SQL Server, it will generate a diagram. In short, it fixes the short comings of the SSMS diagram tool. ![]() The nice advantage of this tool is that both the data types and relationships are shown in the picture. The diagram below was created from Oracle's ERD package. I have a several blog talks using the AUTOS toy database. However, opening the properties pages will allow you to drill into a field (column) and find all the about it.ģ - Last but not least, you can always purchase a third party tool that does it better. The downside of this utility is that the data types are not shown in the picture. I created a diagram for a couple of the tables in the person schema and one in the sales schema. SSMS has a diagram feature that will show the relationships between the tables. ![]() Use corect databaseĭECLARE VARCHAR(128) = 'EXEC SP_HELP ' + char(39) + '?' + CHAR(39) ĮXEC SP_MSFOREACHTABLE - While this gives you textual information on data types and relationships, it does not supply it in graphical form. The first call below executes it for one table, and the second call below executes it for all tables. A couple easy ones come to mind.ġ - The sp_help command gives you a wealth information. I always try to come up with the simplest solution. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |