diff --git a/README.md b/README.md index 76faeaad9..f9e2f70a3 100644 --- a/README.md +++ b/README.md @@ -511,6 +511,11 @@ It can often be tough to evaluation chat bots in multi-turn situations. One way - [WebVoyager](https://github.com/langchain-ai/langgraph/blob/main/examples/web-navigation/web_voyager.ipynb): vision-enabled web browsing agent that uses [Set-of-marks](https://som-gpt4v.github.io/) prompting to navigate a web browser and execute tasks +### [Chain-of-Table](https://github.com/CYQIQ/MultiCoT) + +[Chain of Table](https://arxiv.org/abs/2401.04398) is a framework that elicits SOTA performance when answering questions over tabular data. [This implementation](https://github.com/CYQIQ/MultiCoT) by Github user [CYQIQ](https://github.com/CYQIQ) uses LangGraph to control the flow. + + ## Documentation There are only a few new APIs to use. diff --git a/examples/code_assistant/langgraph_code_assistant.ipynb b/examples/code_assistant/langgraph_code_assistant.ipynb index d9ee03375..a0183de5e 100644 --- a/examples/code_assistant/langgraph_code_assistant.ipynb +++ b/examples/code_assistant/langgraph_code_assistant.ipynb @@ -29,7 +29,7 @@ "\n", "Recent works, such as AlphaCodium, have shown that code generation can be [substantially improved by using a \"flow\" paradigm](https://x.com/karpathy/status/1748043513156272416?s=20).\n", "\n", - "Rather than naive `prompt:answer` paradigm, a `flow` paradigm constructs an answer to a coding question iteratively.\n", + "Rather than a naive `prompt:answer` paradigm, a `flow` paradigm constructs an answer to a coding question iteratively.\n", "\n", "[AlphaCodium](https://github.com/Codium-ai/AlphaCodium) iteravely tests and improves an answer on public and AI-generated tests for a particular question. \n", "\n", @@ -39,7 +39,7 @@ "\n", "## LangGraph self-corrective code assistant\n", "\n", - "We wanted to test these the general idea of iterative code generation in LangGraph, making a few simplifications relative to the AlphaCodium work:\n", + "We wanted to test the general idea of iterative code generation in LangGraph, making a few simplifications relative to the AlphaCodium work:\n", "\n", "1. We start with a set of documentation specified by a user\n", "2. We use a long context LLM to ingest it, and answer a question based upon it \n", diff --git a/examples/rag/langgraph_agentic_rag.ipynb b/examples/rag/langgraph_agentic_rag.ipynb index 07ca74be3..b45d6b469 100644 --- a/examples/rag/langgraph_agentic_rag.ipynb +++ b/examples/rag/langgraph_agentic_rag.ipynb @@ -267,7 +267,7 @@ "\n", " else:\n", " print(\"---DECISION: DOCS NOT RELEVANT---\")\n", - " print(score.binary_score)\n", + " print(grade)\n", " return \"no\"\n", "\n", "\n", @@ -338,7 +338,7 @@ " messages = state[\"messages\"]\n", " question = messages[0].content\n", "\n", - " msg = HumanMessage(\n", + " msg = [HumanMessage(\n", " content=f\"\"\" \\n \n", " Look at the input and try to reason about the underlying semantic intent / meaning. \\n \n", " Here is the initial question:\n", @@ -346,7 +346,7 @@ " {question} \n", " \\n ------- \\n\n", " Formulate an improved question: \"\"\",\n", - " )\n", + " )]\n", "\n", " # Grader\n", " model = ChatOpenAI(temperature=0, model=\"gpt-4-0125-preview\", streaming=True)\n", diff --git a/examples/rewoo/rewoo.ipynb b/examples/rewoo/rewoo.ipynb index 218713d2e..d4f2c7aff 100644 --- a/examples/rewoo/rewoo.ipynb +++ b/examples/rewoo/rewoo.ipynb @@ -342,6 +342,7 @@ " _results = state[\"results\"] or {}\n", " for k, v in _results.items():\n", " tool_input = tool_input.replace(k, v)\n", + " step_name = step_name.replace(k, v)\n", " plan += f\"Plan: {_plan}\\n{step_name} = {tool}[{tool_input}]\"\n", " prompt = solve_prompt.format(plan=plan, task=state[\"task\"])\n", " result = model.invoke(prompt)\n",