Ali Abdullah commited on
Commit
24d4205
·
verified ·
1 Parent(s): 84e7cec

Update vector_store.py

Browse files
Files changed (1) hide show
  1. vector_store.py +4 -1
vector_store.py CHANGED
@@ -78,7 +78,10 @@ class VectorStore:
78
  # Ensure sorted by closest match (smallest L2 distance)
79
  similar_docs = sorted(similar_docs, key=lambda x: x['score'])
80
 
81
- print(f"🔎 Found {len(similar_docs)} similar documents for: '{query[:50]}...'")
 
 
 
82
  return similar_docs
83
  except Exception as e:
84
  print(f"❌ Error searching: {str(e)}")
 
78
  # Ensure sorted by closest match (smallest L2 distance)
79
  similar_docs = sorted(similar_docs, key=lambda x: x['score'])
80
 
81
+ print("\n🧠 Retrieved Chunks:")
82
+ for doc in similar_docs:
83
+ print(f"- Score: {doc['score']:.2f} | Text: {doc['text'][:120]}...\n")
84
+
85
  return similar_docs
86
  except Exception as e:
87
  print(f"❌ Error searching: {str(e)}")