ChatSQL: A LangChain-Driven Chatbot for SQL Database Interaction Using LLMs
摘要
Since the development of AI tools, many companies have been extracting data from chatbots. By making use of large language models (LLMs), which can quickly translate between machine and natural language. One of the generation types made possible by generative AI is the creation of chatbots that can respond in natural language. This study uses a Structured Query Language (SQL) database to describe state-of-the-art, practical database connection. Here, a chatbot was created using the LangChain Framework, connected to MySQL, and using the ChatOpenAI model from LangChain, which was based on the GPT-3.5-Turbo. The paper discusses conventional model-related questions and provides appropriate responses that are consistent with them. Fetching answer from database, the chatbot effectively answers the questions. It struggles with queries not covered by the database, but going forward, ensemble learning techniques will be used to address these. At the same time, chatbot responses and created prompts are gaining knowledge about the LLMs’ capability to generate responses.