NumPy allowed · plain Python earns 10 bonus points
Cosine-like similarity scores ranked before context assembly
Implement fixed-size character chunking with overlap, the baseline chunking strategy every RAG ingestion pipeline starts from.
Implement chunk_with_overlap(text, chunk_size, overlap). Return chunks of chunk_size characters, advancing the start position by chunk_size - overlap each step, until the whole text is covered. The last chunk may be shorter.
chunk_with_overlap(text: str, chunk_size: int, overlap: int) -> list[str]