Added Chunking for query generation.