[bug] : Fix the score printing… (#174)

* bug[examples/rag/langgraph_agentic_rag.ipynb]: Fix the score printing when grader scores "no" and changing "msg" in rewrite node to list

* Update examples/rag/langgraph_agentic_rag.ipynb

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
This commit is contained in:
Kamal Shrestha
2024-03-03 15:56:21 -08:00
committed by GitHub
co-authored by Harrison Chase
parent 0f605c6da4
commit 53d66a8a04
+3 -3
View File
@@ -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",