From 1794b57b43c947e03d2df53f5bd9d1f79cd5a786 Mon Sep 17 00:00:00 2001 From: yangdx Date: Wed, 7 May 2025 03:20:39 +0800 Subject: [PATCH] Ignore chat history in vector search --- lightrag/operate.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lightrag/operate.py b/lightrag/operate.py index 81a20400..c49d8368 100644 --- a/lightrag/operate.py +++ b/lightrag/operate.py @@ -1199,16 +1199,11 @@ async def mix_kg_vector_query( return None async def get_vector_context(): - # Consider conversation history in vector search - augmented_query = query - if history_context: - augmented_query = f"{history_context}\n{query}" - try: # Reduce top_k for vector search in hybrid mode since we have structured information from KG mix_topk = min(10, query_param.top_k) results = await chunks_vdb.query( - augmented_query, top_k=mix_topk, ids=query_param.ids + query, top_k=mix_topk, ids=query_param.ids ) if not results: return None