Although the Bhagavad-gītā was written by Vyāsadeva, it should not be considered as a work of fiction. Mahābhārata is a history of ancient India which factually took place over 5000 years ago. Thus, Vyasadeva, who was present at the time, wrote down the events surrounding the Bhagavad-gītā. Read The History of the Bhagavad-gītā to find out more about the circumstances surrounding Gītā.