From 05b5add48025bb8373e72f2e08b7a3acd62c6b54 Mon Sep 17 00:00:00 2001 From: Andrej Milicevic Date: Tue, 20 Jan 2026 10:59:39 +0100 Subject: [PATCH] fix: cot retriever fix --- .../modules/retrieval/graph_completion_cot_retriever.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cognee/modules/retrieval/graph_completion_cot_retriever.py b/cognee/modules/retrieval/graph_completion_cot_retriever.py index a985900e8..5f61d26d0 100644 --- a/cognee/modules/retrieval/graph_completion_cot_retriever.py +++ b/cognee/modules/retrieval/graph_completion_cot_retriever.py @@ -182,12 +182,9 @@ class GraphCompletionCotRetriever(GraphCompletionRetriever): query_state_tracker[batched_query].context_text = batched_context_text else: # Find new triplets, and update existing query states - followup_triplets_batch = await self.get_context( - query_batch=followup_question_batch - ) - for batched_query, batched_followup_triplets in zip( - query_batch, followup_triplets_batch - ): + triplets_batch = await self.get_context(query_batch=followup_question_batch) + + for batched_query, batched_followup_triplets in zip(query_batch, triplets_batch): query_state_tracker[batched_query].triplets = list( dict.fromkeys( query_state_tracker[batched_query].triplets + batched_followup_triplets