File size: 284 Bytes
4b0e0a6
 
 
 
5535d8a
4b0e0a6
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
"""Utility helpers for evaluation."""

from typing import Iterable

from app.models.retrieval import ScoredChunk


def extract_pages(results: Iterable[ScoredChunk]) -> list[int]:
    """Extract page numbers from retrieved chunks."""
    return [sc.chunk.page_start for sc in results]