Framework for chunk generation