mirror of
https://github.com/NirDiamant/RAG_Techniques.git
synced 2025-04-07 00:48:52 +03:00
fix scores initialization
This commit is contained in:
@@ -400,10 +400,10 @@
|
||||
" document_probabilities = lognorm(document_distances, sigma)\n",
|
||||
" \n",
|
||||
" # Initialize with most relevant document\n",
|
||||
" selection_scores = []\n",
|
||||
" \n",
|
||||
" most_relevant_idx = np.argmax(query_probabilities)\n",
|
||||
" selected_indices = np.array([most_relevant_idx])\n",
|
||||
" \n",
|
||||
" selection_scores = [1.0] # dummy score for the first document\n",
|
||||
" # Get initial distances from the first selected document\n",
|
||||
" max_distances = document_probabilities[most_relevant_idx]\n",
|
||||
" \n",
|
||||
|
||||
Reference in New Issue
Block a user