SQL Chain Example | 🦜🔗 LangChain UseCases

preview_player
Показать описание
SQL Chain Example | 🦜🔗 LangChain UseCases

In this video, I will walk you through a SQL Chain example. I will demonstrate how you can use the SQLDatabaseChain for answering questions over a database. I will be using SQLite and Chinook database. We will also create a database, .db using .sql file. Happy learning and chaining 😎

👉🏼 Links:

⏰ Time stamps:
00:00 👋🏼 Introduction
01:30 ⚙️ Setup
01:54 📚 Creating database in SQLite from .sql file
04:55 🤔💻 SQL Chain part
12:04 🙏 Conclusion

🔗 Other videos you might find helpful:

▶️ Connect with me:

#langchain #llm #openai #sql #sqlite3
Рекомендации по теме
Комментарии
Автор

How does SQLDatabaseChain knows about the database structure (tables, etc)?

ИгорьТ-хм
Автор

Tapai ko video haru Sarai ramro cha bro! Keep up the good work.

AO-iphi
Автор

I made a function to compare between LLMs results and humans results. is sql Query already exist in the database or is it you who makes them ?

hadjersa
Автор

how we could get answer in json format please advice

veeru
Автор

Hi, thanks for the video.
I have 2 questions:

Question 1: what is the difference between "SQLDatabaseChain" and "SQLDatabaseToolkit"?

Question 2: I get an error when i try using the create_sql_agent in the below code.

toolkit = SQLDatabaseToolkit(db=db)
agent_executor = create_sql_agent(
llm=OpenAI(temperature=0),
toolkit=toolkit,
verbose=True
)

ValidationError: 1 validation error for SQLDatabaseToolkit
llm
field required (type=value_error.missing)

Can you please help here? Appretiate your help

AliQureshi-ng
Автор

Thank you, would querying a large database with say 1million row use up a lot of tokens / is there any for of caching that can be done with ChatGPT ?

python
Автор

Excellent info, ,, pls do one video in querying JSON Documents . No one has done any video

rajivraghunathan
Автор

Can we plot a graph of thr output data

Anna
Автор

Unfortunately, in reality this functionality is very early days and doesn't work very well, generating joins across non-existent columns and SQL that is engine specific. It's only good for playing around with at the moment.

colofthedead
Автор

nice video! i try this with ggml-gpt4all-l13b-snoozy.bin and i have this problem : SQLQuery:The prompt size exceeds the context window size and cannot be processed.
The prompt size exceeds the context window size and cannot be processed. any ideas?

mariocuezzo