In one embodiment, a method includes splitting a set of documents into a group of document sections; generating, from the group of document sections, a set of questions and corresponding answers, where each answer comes from content within the group of document sections; and extracting, by each of multiple chunking techniques, a group of document chunks from the document sections. The method further includes, for each chunking technique, determining one or more performance scores based on whether the respective group of chunks' similarity to the set of questions corresponds to the respective answers; and selecting, based on the determined one or more performance scores, at least one chunking technique to use to chunk a corpus of documents that includes the set of documents.