Commit 6c98258
committed
Revert CoVe contexts to full payloads: preserve all vector store metadata
**FIX:**
Line 292: Use full payloads from final_results, not filtered contexts
- Was: contexts=contexts (only id, text, doc_title, url, retrieval_score)
- Now: cove_contexts = [payload for _, payload, _ in final_results]
- Preserves ALL vector store metadata (position, total_chunks, metadata dict, etc.)
**Why this matters:**
- Vector store payloads contain additional fields beyond our filtered contexts
- CoVe citation_injector and verifier may need these metadata fields
- Filtering to only 5 fields could break CoVe's functionality
- Original code was correct - passed full payloads
**Example lost fields:**
- position (chunk position in doc)
- total_chunks (total chunks in doc)
- metadata dict (custom fields like doc_type, etc.)
- Any reranker-added fields (local_rerank_score, etc.)
Reverts to original implementation that preserves all payload data.1 parent 4fa4b51 commit 6c98258
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
292 | 295 | | |
293 | 296 | | |
294 | 297 | | |
295 | | - | |
| 298 | + | |
296 | 299 | | |
297 | 300 | | |
298 | 301 | | |
| |||
0 commit comments