An experiment on how to use the LangChain framework, IRIS Vector Search, and LLMs to generate IRIS-compatible SQL from user prompts.
This article was based in this notebook. You can run it with a ready to use environment with this application in OpenExchange.
Setup
First, we need to install the necessary libraries:
!pip install --upgrade --quiet langchain langchain-openai langchain-iris pandas
Next, we import the required modules and set up the environment:
import os
import datetime
import hashlib
from copy import deepcopy
from sqlalchemy import create_engine
import getpass
import pandas as pd
.png)

.png)

.png)