Lanchain
Agents
Agents use an LLM to decide which tool to invoke.
There are different frameworks for agents
- ReAct
Interleaves reasoning “thoughts” with actions
Chains
How do you do FieldAlgebra ala cascading with LangChain?
Consider the following suppose you have two chain “C1” and “C2” that both have input key “input” and output key “output”. You now want to connect them together. So for this to work the output key of C1 needs to be named to match the expected input key of C2. How do you do this?
It looks like the pattern (e.g. LLM) is for each chain to take as parameters the names of the input and output keys. Then the person constructing the chain can align assign names so that they match.
It doesn’t look like the base Chain provides any functionality for optionally returning inputs in the outputs. However if you use SequentialChain that provides some copying.
Tools
A wrapper around a function that takes a string and returns a string
-
- Input string is the query to run.
- Output is a string containing the best result