Had a fun afternoon learning @LangChainAI 😊 I combined GPT-3 with @statmuse to run queries on NBA stats! Notes on how it works:

https://www.geoffreylitt.com/2023/01/29/fun-with-compositional-llms-querying-basketball-stats-with-gpt-3-statmuse-langchain.html

Fuzzy API composition: querying NBA stats with GPT-3 + Statmuse + Langchain

An exploration of composing multiple tools through a natural language interface

the tl;dr is that you can treat GPT-3 as a control flow orchestrator, which breaks down a question about the NBA and uses a stats database + a calculator to figure out the answer.

all mediated through natural language.

pretty wild!

Probably the most interesting moment was when GPT-3 iteratively learned to query the Statmuse interface effectively by responding to natural language error messages
The weirdest thing about the whole setup is that you just tell the “agent” LLM what structured tools it has available and when they might be helpful (eg use calculator for math), and then the agent automatically decides how to use the tools to achieve the task
Makes me wonder about the applications to end-user programming. Maybe in some cases we can start with pre-built “tool” primitives and compose with fuzzy LLM logic? (Rather than, eg, writing spreadsheet formulas which compose primitive operators like SUM)

The recent "agent toolkits" update from @LangChainAI is really neat: helps the model dynamically learn to use a SQL schema or an API! Vaguely reminds me of how a human would go about interacting with a SQL DB

https://blog.langchain.dev/agent-toolkits/

Agent Toolkits

Today, we're announcing agent toolkits, a new abstraction that allows developers to create agents designed for a particular use-case (for example, interacting with a relational database or interacting with an OpenAPI spec). We hope to continue developing different toolkits that can enable agents to do amazing feats. Toolkits are supported

LangChain
@geoffreylitt Possible issue with either your post/site or my RSS reader: the image at the top of the post doesn't load. I'm on iOS so I can't easily inspect the source — apologies.
@spiralganglion thanks for the heads up, other people have complained about related things; I think I’m doing something weird with URLs in my RSS feed