Text Generation
Transformers
Safetensors
dbrx
conversational
text-generation-inference

Text2sql template and examples

#34
by daxiongshu - opened

Hello, congrats on releasing this phenomenal model! In the blog I am happily surprised by this statement "DBRX is already being integrated into our GenAI-powered products, where - in applications like SQL - early rollouts have surpassed GPT-3.5 Turbo and are challenging GPT-4 Turbo."

Could you kindly provide some instructions on templates and examples of text2sql tasks? Do we use base or instruct DBRX? Thank you so much!

Databricks org

The usage within Databricks would be specific to Databricks, but I don't think there is a special template you need to use this model for text to SQL. You could pair it with tools like Langchain to implement this. You can try just asking the LLM directly by hand too. At https://huggingface.co./spaces/databricks/dbrx-instruct try a query ike:

Use the following table schema:

CREATE TABLE Persons ( PersonID int, LastName varchar(255), FirstName varchar(255), Address varchar(255), City varchar(255) );

Write a SQL query that counts how many people have a last name that is longer than their first name.

But even DBRX AI assistance can give the required output to the prompt.

Can we use DBRX for getting all our answer from a Data Warehouse or a Dimensional model where there are many table connected to each other either via Star Schema or Snowflake schema.
My end goal is to leverage a Model like DBRX Instruct which will give me answers to my prompt from my Database which can have multiple tables.

Databricks org

You can do that. You need means of accessing the schemas and deciding which are relevant to the query. This is indeed where you probably need a more complex system in place, not just a language model. Yes, Databricks has that part too

Sign up or log in to comment