mirror of
https://github.com/HKUDS/LightRAG.git
synced 2025-09-27 17:15:45 +00:00
Ignore chat history in vector search
This commit is contained in:
parent
c984ebd462
commit
1794b57b43
@ -1199,16 +1199,11 @@ async def mix_kg_vector_query(
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
async def get_vector_context():
|
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:
|
try:
|
||||||
# Reduce top_k for vector search in hybrid mode since we have structured information from KG
|
# Reduce top_k for vector search in hybrid mode since we have structured information from KG
|
||||||
mix_topk = min(10, query_param.top_k)
|
mix_topk = min(10, query_param.top_k)
|
||||||
results = await chunks_vdb.query(
|
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:
|
if not results:
|
||||||
return None
|
return None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user