Update vector query methods to support ID filtering in PostgreSQL
- Modified `mix_kg_vector_query` in operate.py to pass optional IDs to vector search - Updated PostgreSQL SQL template to filter results using document IDs instead of chunk_id - Improved query flexibility by allowing precise document selection during vector search
This commit is contained in:
@@ -892,7 +892,8 @@ async def mix_kg_vector_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)
|
||||
# TODO: add ids to the query
|
||||
results = await chunks_vdb.query(augmented_query, top_k=mix_topk, ids = query_param.ids)
|
||||
if not results:
|
||||
return None
|
||||
|
||||
|
Reference in New Issue
Block a user