Skip to content

The agent engineering platform.

fix self ask template (#216)

Harrison Chase03c714022851
diff --git a/docs/examples/agents/self_ask_with_search.ipynb b/docs/examples/agents/self_ask_with_search.ipynb
index aa3ab58eab..7be3b59fdc 100644
--- a/docs/examples/agents/self_ask_with_search.ipynb
+++ b/docs/examples/agents/self_ask_with_search.ipynb
@@ -20,13 +20,17 @@
"name": "stdout",
"output_type": "stream",
"text": [
+ "\n",
+ "\n",
+ "\u001b[1m> Entering new SelfAskWithSearchAgent chain...\u001b[0m\n",
"What is the hometown of the reigning men's U.S. Open champion?\n",
"Are follow up questions needed here:\u001b[32;1m\u001b[1;3m Yes.\n",
"Follow up: Who is the reigning men's U.S. Open champion?\u001b[0m\n",
"Intermediate answer: \u001b[36;1m\u001b[1;3mCarlos Alcaraz\u001b[0m\n",
"\u001b[32;1m\u001b[1;3mFollow up: Where is Carlos Alcaraz from?\u001b[0m\n",
"Intermediate answer: \u001b[36;1m\u001b[1;3mEl Palmar, Spain\u001b[0m\n",
- "\u001b[32;1m\u001b[1;3mSo the final answer is: El Palmar, Spain\u001b[0m"
+ "\u001b[32;1m\u001b[1;3mSo the final answer is: El Palmar, Spain\u001b[0m\n",
+ "\u001b[1m> Finished SelfAskWithSearchAgent chain.\u001b[0m\n"
]
},
{
diff --git a/langchain/agents/self_ask_with_search/prompt.py b/langchain/agents/self_ask_with_search/prompt.py
index f9d0c5b6d6..0a387457d2 100644
--- a/langchain/agents/self_ask_with_search/prompt.py
+++ b/langchain/agents/self_ask_with_search/prompt.py
@@ -28,13 +28,13 @@ So the final answer is: Joseph Ball
Question: Are both the directors of Jaws and Casino Royale from the same country?
Are follow up questions needed here: Yes.
Follow up: Who is the director of Jaws?
-Intermediate Answer: The director of Jaws is Steven Spielberg.
+Intermediate answer: The director of Jaws is Steven Spielberg.
Follow up: Where is Steven Spielberg from?
-Intermediate Answer: The United States.
+Intermediate answer: The United States.
Follow up: Who is the director of Casino Royale?
-Intermediate Answer: The director of Casino Royale is Martin Campbell.
+Intermediate answer: The director of Casino Royale is Martin Campbell.
Follow up: Where is Martin Campbell from?
-Intermediate Answer: New Zealand.
+Intermediate answer: New Zealand.
So the final answer is: No
Question: {input}"""