top | item 35655777

Show HN: Build AI DAGs with Memory; Run and Validate LLM Tools in Containers

48 points| vasinov | 2 years ago |github.com

I am working on a modular open source framework called Griptape that allows Python developers to create LLM pipelines and DAGs for complex workflows that use rules and memory.

Griptape can be thought of as "Airflow for LLMs," providing an alternative to the agent-based LangChain approach.

Developers can also build reusable LLM tools with explicit JSON schemas that can be executed in any environment (local, containerized, cloud, etc.) and integrated into Griptape workflows. They can also be easily converted into ChatGPT Plugin APIs and LangChain tools via adapters.

Tools can be thought of as any executable code that allows LLMs to interact with the outside world (via ReAct and Toolformer techniques): email, docs, spreadsheets, Jira tickets, web pages/search, etc.

The best part about tools is that they can be executed in isolated environments, significantly reducing potential security risks associated with running LLM-generated code and API calls.

What do you think? What are some of the use cases that you have in mind for reusable tools?

11 comments

order

cto_official|2 years ago

Great initiative! I was wondering if you could kindly provide me with a comparison of how this initiative compares with Langchain? Additionally, I have observed that there are numerous libraries available along with GPT, however, none of them seem to be production-ready and seem to be intended only for hobbyists. Would you kindly elaborate on your plan to address this issue? Thank you very much!

tartakovsky|2 years ago

This looks cool. I am sort of unclear about this contrasting statement to Langchain when it seems you are building on too of / or using Langchain to achieve some functionality. Is that incorrect? Also, I looked at your repo to contribute, but sadly I see no issues!

vasinov|2 years ago

I should, perhaps, add an FAQ section addressing the hows and whys of Griptape :)

In short, Griptape is different from LangChain in the following ways:

- Instead of chained agents, it uses more general-purpose DAGs and pipelines. Think of it as Airflow for LLMs. It still implements chain of thought logic for prompt workflow steps that use tools but it also supports any kind of input and output (think images, audio, etc.). - Griptape tools are designed to be decoupled from the caller logic and execution environments. For example, tools can be easily run in a Docker container or a Lambda function (as opposed to just YOLOing LLM-generated Python code on the local box). - Tools can be plugged into other LLM frameworks through adapters. For example, you can convert any Griptape tool into a LangChain tool or generate a ChatGPT Plugin API with a single line of code. This is the only place Griptape actually references LangChain in code, afaik :)

Issues do need to be moved from a private Trello into GitHub (still early days...)—I can ping when that's done—are you on Griptape Discord?

d4rkp4ttern|2 years ago

I didn’t see any such contrasting statement, maybe I missed it?

james-revisoai|2 years ago

Nice, how does the Webscraper work? Will it work on e.g. a React site?

Would be a nice use-case to plop a website into a chatbot easily, for example.

vasinov|2 years ago

The WebScraper tool uses Trafilatura [1] to scrape and parse HTML—nothing too fancy. "Scraping" a React site would require a totally different approach, probably something more akin to Adept's ACT-1 [2].

I run a local chat app built with Griptape and I use it to give me summaries of web pages or answer specific questions all the time :)

1. https://github.com/adbar/trafilatura/

2. https://www.adept.ai/blog/act-1