Add lats image

This commit is contained in:
William Fu-Hinthorn
2024-02-20 17:48:20 -08:00
parent c8411df833
commit 18f4602900
2 changed files with 8 additions and 4 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

+8 -4
View File
@@ -9,11 +9,14 @@
"\n",
"[Language Agent Tree Search](https://andyz245.github.io/LanguageAgentTreeSearch/) (LATS), by Zhou, et. al, is a general LLM agent frameowrk that combines reflection/evaluation and search (specifically monte-carlo trees search) to get achieve better overall task performance compared to similar techniques like ReACT, Reflexion, or Tree of Thoughts.\n",
"\n",
"![LATS diagram](./img/lats.png)\n",
"\n",
"It has four main steps:\n",
"1. Expand and simulate: select the \"best\" 5 potential actions to take and execute them in parallel.\n",
"2. Reflect + Evaluate: observe the outcomes of these actions and score the decisions based on reflection (and possibly external feedback)\n",
"3. Backpropagate: update the scores of the root trajectories based on the outcomes.\n",
"4. Select: pick the best next actions based on the aggreate rewards from step (2). Either respond (if a solution is found or the max search depth is reached) or continue searching."
"\n",
"1. Select: pick the best next actions based on the aggreate rewards from step (2). Either respond (if a solution is found or the max search depth is reached) or continue searching.\n",
"2. Expand and simulate: select the \"best\" 5 potential actions to take and execute them in parallel.\n",
"3. Reflect + Evaluate: observe the outcomes of these actions and score the decisions based on reflection (and possibly external feedback)\n",
"4. Backpropagate: update the scores of the root trajectories based on the outcomes."
]
},
{
@@ -285,6 +288,7 @@
"source": [
"from langchain_community.tools.tavily_search import TavilySearchResults\n",
"from langchain_community.utilities.tavily_search import TavilySearchAPIWrapper\n",
"\n",
"from langgraph.prebuilt.tool_executor import ToolExecutor, ToolInvocation\n",
"\n",
"search = TavilySearchAPIWrapper()\n",