No video

Robust Text-to-SQL With LangChain: Claude 3 vs GPT-4

  Рет қаралды 4,592

Rabbitmetrics

Rabbitmetrics

Күн бұрын

Пікірлер: 15
@andaldana
@andaldana 19 күн бұрын
Great video! Always something new to learn!
@Shai_Di
@Shai_Di 3 ай бұрын
This is really interesting but I have some concerns about this method, I'd love to hear what you think about them: 1. We are always sending the entire schema as context. If we want to have a large dataset connected to this "application", we will waste a ton of tokens on that. The agent that LangChain built slowly decides which tables might be relevant, thus reducing the amount of tokens used as context. How would you approach something like this? 2. Sometimes, tables and column names might not be super intuitive to the LLM, and without sampling the data, it can assume properties, values or anything else. So this requires the user to review the query and make sure it makes sense, which is what we are kind of trying to prevent when we start using AI for queries. What do you think about adding a semi step that will somehow sample the relevant data?
@kelvinadungosi1579
@kelvinadungosi1579 4 ай бұрын
Hi, great tutorial! How would you implement a chat fuctionality? where you can ask follow up questions??
@rabbitmetrics
@rabbitmetrics 4 ай бұрын
Thanks! I would use ChatMessageHistory to manage the conversation and catch the traceback - this is needed for more advanced queries.
@TheBestgoku
@TheBestgoku 4 ай бұрын
THIS is function-calling but instead of a "json" u get a "sql query". Am i missing something?
@rabbitmetrics
@rabbitmetrics 4 ай бұрын
That is one way to think of it. But in this case LangChain is handling the parsing of the LLM output (note the "model.bind(stop=[" SQLResult:"])" in the chain). When you generate SQL or any other code you'll find that the code is often returned in quotes or with some text explaining the code. The trick is to minimize this by parsing the output in a suitable way.
@AndresAlarcon-bb9ql
@AndresAlarcon-bb9ql 4 ай бұрын
Hi, question, how do you configure it to use gemini-pro and not gpt-4?
@rabbitmetrics
@rabbitmetrics 4 ай бұрын
Hi, you install the LangChain integrations for Gemini pypi.org/project/langchain-google-genai/ then you import ChatGoogleGenerativeAI and define llm = ChatGoogleGenerativeAI(model="gemini-pro")
@AndresAlarcon-bb9ql
@AndresAlarcon-bb9ql 4 ай бұрын
@@rabbitmetrics I did it, but it doesn't work, it has this error: TypeError: Expected a Runnable, callable or dict. Instead got an unsupported type:
@rabbitmetrics
@rabbitmetrics 4 ай бұрын
@@AndresAlarcon-bb9ql you might be passing a string instead of a function in the RunnablePassthrough?
@SR-zi1pw
@SR-zi1pw 5 ай бұрын
What happens if he drops the table when hallucinating
@MaxwellHay
@MaxwellHay 5 ай бұрын
Read only role
@rabbitmetrics
@rabbitmetrics 4 ай бұрын
As mentioned, make sure to restrict access scope and permission.
@lionhuang9209
@lionhuang9209 5 ай бұрын
Where can we download the code file?
@rabbitmetrics
@rabbitmetrics 5 ай бұрын
There's a link below the video to the Colab notebook with code and written tutorial including how to generate the ecom tables
Advanced SQL Generation with LangChain & Redis
11:19
Rabbitmetrics
Рет қаралды 3 М.
Learn LangChain in 7 Easy Steps - Full Interactive Beginner Tutorial
41:37
❌Разве такое возможно? #story
01:00
Кэри Найс
Рет қаралды 4 МЛН
Please Help Barry Choose His Real Son
00:23
Garri Creative
Рет қаралды 23 МЛН
ROLLING DOWN
00:20
Natan por Aí
Рет қаралды 11 МЛН
LLMs will Transform Data Science - Here's How
25:04
Rabbitmetrics
Рет қаралды 4,9 М.
Discover LlamaIndex: Joint Text to SQL and Semantic Search
20:08
LLM for data analytics: text-to-sql 3 architecture patterns
6:59
Denys on Data
Рет қаралды 1,6 М.
LangChain Explained in 13 Minutes | QuickStart Tutorial for Beginners
12:44
Text to SQL is solved. What's next?
10:45
Airbyte
Рет қаралды 1,3 М.
Writing My Own Database From Scratch
42:00
Tony Saro
Рет қаралды 214 М.
Chat with SQL and Tabular Databases using LLM Agents (DON'T USE RAG!)
58:54
MongoDB Explained in 10 Minutes | SQL vs NoSQL | Jumpstart
11:18
Personalizing LLMs: Step-by-Step with LangChain
20:04
Rabbitmetrics
Рет қаралды 4,1 М.
❌Разве такое возможно? #story
01:00
Кэри Найс
Рет қаралды 4 МЛН