Flattened data structure for model retrieval