From 2a0d6788f7297cddc6c2f37e2aa91e22b9cf22ed Mon Sep 17 00:00:00 2001 From: WU LIFU Date: Fri, 28 Jun 2024 04:22:26 +0800 Subject: [PATCH] docs[patch]: extraction_examples fix the examples given to the llm (#23393) Descriptions: currently in the [doc](https://python.langchain.com/v0.2/docs/how_to/extraction_examples/) it sets "Data" as the LLM's structured output schema, however its examples given to the LLM output's "Person", which causes the LLM to be confused and might occasionally return "Person" as the function to call issue: #23383 Co-authored-by: Lifu Wu --- docs/docs/how_to/extraction_examples.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/how_to/extraction_examples.ipynb b/docs/docs/how_to/extraction_examples.ipynb index d6cd55982c5..f9d83423b6f 100644 --- a/docs/docs/how_to/extraction_examples.ipynb +++ b/docs/docs/how_to/extraction_examples.ipynb @@ -246,11 +246,11 @@ "examples = [\n", " (\n", " \"The ocean is vast and blue. It's more than 20,000 feet deep. There are many fish in it.\",\n", - " Person(name=None, height_in_meters=None, hair_color=None),\n", + " Data(people=[]),\n", " ),\n", " (\n", " \"Fiona traveled far from France to Spain.\",\n", - " Person(name=\"Fiona\", height_in_meters=None, hair_color=None),\n", + " Data(people=[Person(name=\"Fiona\", height_in_meters=None, hair_color=None)]),\n", " ),\n", "]\n", "\n",