One thing I love about LangChain (and LlamaIndex) is that rather than having to find the latest relevant arxiv papers, and then try to understand them by reading 20-30 pages, I can just monitor these libraries' blogs and release changes to discover the latest relevant papers, then read their implementation code.
LLM based autonomous agents remind me a lot of Leonard from the movie Memento. In the movie, Leonard is trying desperately to find the murderer of his wife, but he has one big problem - he can no longer build new memories. So, he needs to develop a system for storing new knowledge and then retrieving the relevant bits every time he formulates a plan for what to do next. Throughput the movie, Leonard makes a number of missteps because his system for recording and retrieving knowledge from this external memory system is imperfect. The movie is very well done.
These agent approaches should really incorporate the recent neurology research around predictive processing appearing to be a three tiered process of "long term prediction," "intermediate prediction," and "short term prediction."<p>What I've seen is very heavily weighted towards chain of thought using the latter to satisfy the former, but explicitly stepping down from broad to intermediate to narrow (and re-evaluating as it goes) will probably work even better.
What's fascinating for me is how directly LangChain's Input > Thought > Action > Observation maps to the Observe > Orient > Decide > Act (OODA) Loop that is used in many other industries: <a href="https://en.wikipedia.org/wiki/OODA_loop" rel="nofollow">https://en.wikipedia.org/wiki/OODA_loop</a>. The fact that we can do OODA loops without a human in the loop--by just passing a bunch of tools and adding memory to a LangChain--is simply mind blowing.<p>Having said that, I believe LangChain can benefit from incorporating learnings/failures from successful OODA Loops where human feedback continually improves the automation. I am not an expert, but it seems like this type of human feedback can be incorporated into LangChain by plugging in an RLHF framework. Not sure though if this RLHF framework plugs into Thought or Action.
"For this discussion, we will use LangChain nomenclature, although it’s worth noting that this field is so new there’s no super standard terminology."<p>There is in fact a "super standard" terminology. This breathless sentence is denying that a computer science "field" existed prior to the LLM chatboxes ("this field").<p><a href="https://en.wikipedia.org/wiki/Software_agent" rel="nofollow">https://en.wikipedia.org/wiki/Software_agent</a>
Research on Agent architectures is evolving real fast. I read Park et al.'s paper on Generative Agents a couple of weeks back which seems to have the potential to put LangChain's Memory on steroids: <a href="https://arxiv.org/abs/2304.03442" rel="nofollow">https://arxiv.org/abs/2304.03442</a><p>"To enable generative agents, we describe an architecture that extends a large language model to store a complete record of the agent's experiences using natural language, synthesize those memories over time into higher-level reflections, and retrieve them dynamically to plan behavior."<p>Can't wait for LangChain to incorporate a long-term, reflection-based memory system.
Slightly related: what's the difference in use cases of llama-index vs LangChain? I know that LangChain can make retrieval using embeddings and I suspect that the nodes synth step is exclusive to llama-index, but I might be wrong.<p>Can someone more knowledgeable chime in?
In case you want a much simpler implementation of the ReAct agent with tools, it's here with ~200 loc:<p><a href="https://github.com/mpaepper/llm_agents">https://github.com/mpaepper/llm_agents</a>
These agents, even in their embryonic form, are so powerful. The world is about to change. I'm convinced we're at the beginning of a massive exponential.