
langchain-iris-tool
Contains an implementation of a Langchain Tool (BaseTool) to do RAG operations on Intersystems IRIS Server.
It is a Chat Agent tool also. It is possible ask questions like:
- List the server metrics
- Return intersystems iris server information
- Save the global value Hello to the global name Greetings
- Get the global value Greetings
- Kill the global Greetings
- List the classes on IRIS Server
- Where is intersystems iris installed?
- Return namespace information from the USER
- List the CSP Applications
- List the server files on namespace USER
- List the jobs on namespace %SYS
- List alerts
Now, we have fake data generation using Generative AI.
Prerequisites
Make sure you have git and Docker desktop installed.
Installation
Docker (e.g. for dev purposes)
Clone/git pull the repo into any local directory
$ git clone https://github.com/yurimarx/langchain-iris-tool.git
Open the terminal in this directory and run:
$ docker-compose build
$ docker-compose up -d
Solutions used
- Ollama - private LLM and NLP Chat tool
- Lanchain - plataform to build AI agents
- Streamlit - Frontend framework
- InterSystems IRIS as a server to answer the questions about it
1. Testing IRIS Classes Chat
- Open the URL http://localhost:8501
-
Click item menu Iris Classes Chat
-
Check out the Settings button used to the Agent connect the InterSystems IRIS
- Ask about your developed classes (e.g.: Are there classes that inherit from Persistent?)
2. Testing IRIS Tool Chat
- Open the URL http://localhost:8501
-
Click item menu Iris Tool Chat
-
Check out the Settings button used to the Agent connect the InterSystems IRIS
- Ask one of the following questions and wait some seconds to see the results:
- List the server metrics
- Return intersystems iris server information
- Save the global value Hello to the global name Greetings
- Get the global value Greetings
- Kill the global Greetings
- List the classes on IRIS Server
- Where is intersystems iris installed?
- Return namespace information from the USER
- List the CSP Applications
- List the server files on namespace USER
- List the jobs on namespace %SYS
- List alerts
3. Testing the fake data generation
- Open the IRIS terminal on USER namespace and generate fake data from sample data on Company table:
USER>do ##class(dc.gendata.FakeData).Generate(“dc_gendata”,“Company”,“1=1”,“Company”,10,“Basic company data”,.results)
- Wait 10-30 minutes to generate and see the results on the output variable (results):
USER>write results