Two issues caused retrieval metrics (precision, recall, NDCG, MRR, MAP) to always be 0: 1. recordFinish compared SearchResult.ChunkIndex (the chunk's ordinal position in the knowledge base) against QAPair.PIDs (the dataset's original passage IDs). These are different ID spaces that never match. Fix: use content-based matching to map each retrieved chunk back to its source passage, with deduplication for multi-chunk passages. 2. getPassageList had an off-by-one error: make([]string, maxPID) with loop i < maxPID dropped the passage with the highest PID. Fix: use maxPID+1 and i <= maxPID. Also adds fallback from rerankResult to searchResult when no rerank model is configured, matching the pattern in the working copy. |
||
|---|---|---|
| .. | ||
| repository | ||
| service | ||