From 1cc9e900417c0b3bb57aff971b723a21b10eb18a Mon Sep 17 00:00:00 2001 From: Francisco Ingham Date: Mon, 27 Mar 2023 20:33:26 -0300 Subject: [PATCH] Solve small bug in the kg prompt (#1988) I think that the 'Person' line should be under 'Last line of conversation' as is the case in the other examples in the kg prompt --- langchain/memory/prompt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/langchain/memory/prompt.py b/langchain/memory/prompt.py index 6f7338ff..af74b655 100644 --- a/langchain/memory/prompt.py +++ b/langchain/memory/prompt.py @@ -148,8 +148,8 @@ _DEFAULT_KNOWLEDGE_TRIPLE_EXTRACTION_TEMPLATE = ( "AI: Descartes was a French philosopher, mathematician, and scientist who lived in the 17th century.\n" "Person #1: The Descartes I'm referring to is a standup comedian and interior designer from Montreal.\n" "AI: Oh yes, He is a comedian and an interior designer. He has been in the industry for 30 years. His favorite food is baked bean pie.\n" - "Person #1: Oh huh. I know Descartes likes to drive antique scooters and play the mandolin.\n" "Last line of conversation:\n" + "Person #1: Oh huh. I know Descartes likes to drive antique scooters and play the mandolin.\n" f"Output: (Descartes, likes to drive, antique scooters){KG_TRIPLE_DELIMITER}(Descartes, plays, mandolin)\n" "END OF EXAMPLE\n\n" "Conversation history (for reference only):\n"