diff --git a/libs/community/langchain_community/vectorstores/azuresearch.py b/libs/community/langchain_community/vectorstores/azuresearch.py index 90fca0ba049..4474e16ad41 100644 --- a/libs/community/langchain_community/vectorstores/azuresearch.py +++ b/libs/community/langchain_community/vectorstores/azuresearch.py @@ -604,7 +604,7 @@ class AzureSearch(VectorStore): if result.get("@search.captions") else {}, "answers": semantic_answers_dict.get( - json.loads(result["metadata"]).get("key"), + result.get(FIELDS_ID, ""), "", ), },