Jiyiji 集異記 "Collection of strange stories", also called Guyiji 古異記 "Ancient stories of strange affairs", is a collection of novellas compiled between the Southern Dynasties 南朝 (420~589) and the Tang periods 唐 (618-907). There are actually two books of this title, one written by Xue Yongruo 薛用弱, who lived during the Tang period, and one by Guo Jichan 郭季產, a Liu-Song period 劉宋 (420-479) writer. The latter is lost except for a few fragments. Guo Jichan also wrote a historiographical book, the lost Xu jinji 續晉紀.
Xue Yongruo, courtesy name Zhongsheng 中勝, hailed from Hedong 河東 (today's Yongji 永濟, Shanxi) and was regional inspector (cishi 刺史) of Guangzhou 光州 (commandery Yiyang 弋陽) during the reign of Emperor Muzong 唐穆宗 (r. 820-824).
The most popular stories in the Jiyiji are Wang Wei's 王維 (699-759) performance of the play Youlunpao 郁輪袍, that of the wall painting of Wang Zhihuan 王之涣 (688-742), Cai Shaoxia's 蔡少霞 (died 820) calligraphy of Shang Xuanqing's 山玄卿 patent Canglongxi xinguan ming 蒼龍溪新官銘, the story how Pei Yue 裴越 used a tiger as a marriage broker, or Cui Tao's 崔韜 encounter with a tiger girl. These stories had a significant impact on popular tales, novels, and plays. The story of Wang Feng 汪鳳, for instance, in which Zhang Li 張勵 accidentally releases detained ghosts, is resumed at the beginning of the novel Shuihuzhuan 水滸傳; the revenge of Master Jia's wife (Jia qi 賈妻) is narrated in the Ming-period 明 (1368-1644) collection Liaozhai zhiyi 卿齋志異.
In the imperial bibliography in the Xintangshu 新唐書, the length of the Jiyiji is indicated as 3 juan. The received version includes 16 chapters in 2 juan. Many stories are quoted in the Tang-period encyclopaedias Beitang shuchao 北堂書鈔, Yiwen leiju 藝文類聚 and the Song-period 宋 (960-1279) encyclopedias Taiping yulan 太平御覽 and Taiping guangji 太平廣記.
The Qing-period 清 (1644-1911) scholar Lu Xinyuan 陸心源 (1838-1894) collected fragments surviving in such quotations and published a supplement with a length of 4 juan that is included in the collection Qunshu jiaobu 群書校補. This large number of fragments results from the inclusion of foreign stories that were not written by Xue Yongruo but were included in similar collections, such as the lost Jiyiji by Guo Jichan.
Lu Xun's 魯迅 (1881-1936) collection Gu xiaoshuo gouchen 古小說鉤沉 includes 11 stories, most dealing with ghosts and prognostication.
The Jiyiji is included in the series Gushi wenfang xiaoshuo 顧氏文房小說 and Siku quanshu 四庫全書.
A modern edition of the Jiyiji including a supplement was published in 1980 by the Zhonghua Shuju Press 中華書局, as a unified edition together with the collection Boyizhi 博異志 that is attributed to a master called Gushenzi 谷神子.