Tanyuan 談苑 "Garden of discussions" is a "brush-notes"-style book (biji 筆記) allegedly written during the Song period 宋 (960-1279) by Kong Pingzhong 孔平仲 (1044-1111), courtesy name Yifu 義甫 (also written 毅父), from Xinyu 新喻 (today's Xinyu 新餘, Jiangxi). It is also called Kongshi tanyuan 孔氏談苑 to avoid confusion with Wang Junyu's 王君玉 Guolao tanyuan 國老談苑 (also called Guolao xiantan 國老閒談), Yang Yi's 楊億 (974-1020) Tanyuan 談苑, or and Yu Huai's 余懷 (1616-1695) Shandong tanyuan 東山談苑 from the early Qing period 清 (1644-1911).
The 4-juan-long Kongshi tanyuan includes stories about contemporary persons. Unfortunately, many statements do not align with the evidence in other books, and the individual stories are quite fragmentary. It can, therefore, be doubted that Kong Pingzhong was the real author of this book, an assumption supported by Zhao Yushi's 趙與時 (1172-1228) Bintuilu 賓退錄 and the fact that the imperial bibliography of the official dynastic history Songshi 宋史 lists two texts by Kong Pingzhong, namely Baishuo 稗說, and Zashuo 雜說, but no book called Tanyuan. Seen from the content, the Tanyuan is instead a collection of novellas than of historically based lives and events.
The Kongshi tanyuan is included in the series Baoyantang miji 寶顏堂秘笈, Siku quanshu 四庫全書, Yihai zhuchen 藝海珠塵 and Congshu jicheng chubian 叢書集成初編.