The ingestion example should inspect the per-document results returned by upload_documents. A batch request completing does not establish that every chunk was accepted, and the current function discards the response entirely. That can make a retrieval miss look like an embedding or ranking problem when the expected chunk was never indexed.
I would add a fixture with one rejected document among otherwise valid chunks, then require ingestion to report the failed IDs and their errors. The retrieval evaluation can then run only after its expected corpus has actually been accounted for, rather than inferring successful ingestion from the absence of a thrown exception.