AutoKG: Efficient Automated Knowledge Graph Generation for Language Models