In the spring of the fourth year Dazhong (850 CE), Wang Kun of Taiyuan was serving as Doctor to the National University. His maidservant, Qing Yun, had died several years before this, but one night he suddenly dreamed that Qing Yun arrived before his bed. Kun was extremely afraid, but rose and questioned her. Qing Yun said: “Your servant has not been a human for several years now, and found myself missing my mortal life, as if I was bound but had not forgotten my release. This evening I received the opportunity to serve by your side, and am very pleased to see you.” Kun was muddled, as if he was drunk, and did not realize that she was a spirit. Qing Yun then led Kun out through the doorway. The gate had already been locked, but she guided Kun through a crevice and he passed through without harm. They reached the centre of the road, and paced back and forth under the moon.
After some time had passed, Kun suddenly felt hungry, and told Qing Yun. Qing Yun replied: “Is there a friend in the village who would give to my darling? Point them out and we’ll ask them for food.” Kun had long been friends with the Scholar to the Imperial College Shi Guan, and he too resided in the village, so Kun went there with her. When they reached Guan’s gate, it was already closed and bolted. Qing Yun knocked upon it, and after a little while the gatekeeper opened a leaf of the door and looked out, but said: “I just heard a knock on the gate, but now I look all is quiet, with nothing to see. How can that be?” He closed the leaf again, but Qing Yun knocked on it once more, and then again, for a third time. The gatekeeper asked, in angry tones: “How come these evil spirits always come to knock on our door?” He then spat and cursed them. Qing Yun explained to Kun: “Mr Shi has already gone to sleep. We certainly can’t call on him now. I hope the gentleman can suggest somewhere else.” At that time there was a junior clerk of the Imperial College who was also from the same village. When he went out he often passed the other’s gate, and the clerk would often pass on his superior’s monthly salary and slips of paper reporting new  appointments. Kun trusted him implicitly.
When they arrived together at his house, they saw one leaf of the door open, and someone carrying a jar of water to scatter onto the street. Qing Yun said: “We should enter with him.” When they had stepped inside, they saw that the junior clerk was dining with several other people. Initially, Kun stood in the courtyard, thinking that the clerk would descend the steps and bow to him, but after some time the clerk still hadn’t given any sign of such courtesy. Presently they saw a maid carrying noodle soup up the steps. Qing Yun struck the servant on the back, at which she fell on the steps, and the soup was all spilled. The clerk, his wife and servants all leapt up, saying fearfully: “This is a malign attack!” They then hurriedly summoned a spirit-medium. The medium told them: “There’s someone there, with a red official’s knee-cover and a silver seal, standing before us in the courtyard.” They therefore made offerings to him, so Kun and Qing Yun sat down together. When the food was finished, they set out together, and the female medium accompanied them to the gate, burning spirit-money beside the entrance. At this Qing Yun addressed Kun: “The gentleman should accompany your servant and depart.” Kun therefore followed her into the village. He looked around and saw that it was the start of summer.
When they reached open countryside in the outskirts after several dozen li, they came to a tomb. Qing Yun said: “This is where your servant dwells. The gentleman should follow and enter.” The mouth of the grave was pitch black and he could not make anything out. Suddenly he awoke in palpitations of pure terror, his back sweating and his body shaking all over. By then the dawn had already broken, but his heart was full of revulsion towards the dream, and he dared not tell anyone about it. That day, he therefore decided to invite Shi Guan. When they had sat down together, Guan told him: “Last night there was a spirit that knocked at my gate three times; we sent people to look but all was quiet and nobody was there. When dawn broke I crossed to see the junior clerk, and found the remains of spirit money. I stood and summoned the clerk to ask about it, and the clerk told me: ‘Your servant had a dinner party last night, and there was a sudden malign attack on our maid. The spirit-medium told us we were haunted by a spirit, so we made offerings in the courtyard. This is the burnt paper.'” All of this was exactly the same as Kun’s dream. Kun grew ever more afraid, so informed his wife and children. In the winter of that year, he did indeed die.
Li Fang 李昉, et al., Taiping guangji 太平廣記 (Extensive Gleanings from the Era of Great Harmony), 10 vols (Beijing: Zhonghua shuju, 1961), viii, 351.2778-79
太原王坤。大中四年春為國子博士。有婢輕雲。卒數年矣。一夕。忽夢輕雲至榻前。坤甚懼。起而訊之。輕雲曰。某自不為人數年矣。嘗念平生時。若縶而不忘解也。今夕得奉左右。亦幸會耳。坤懵然若醉。不寤為鬼也。輕雲即引坤出門。門已扃鐍。隙中導坤而過。曾無礙。行至衢中。步月徘徊。久之。坤忽飢。語於輕雲。輕雲曰。里中人有與郎善者乎。可以詣而求食也。坤素與太學博士石貫善。又同里居。坤因與偕行。至貫門。而門已鍵閉。輕雲叩之。有頃。閽者啟扉曰。向聞叩門。今寂無覩。何也。因闔扉。輕雲又扣之。如是者三。閽者怒曰。厲鬼安得輒扣吾門。且唾且罵之。輕白坤云。石生已寢。固不可詣矣。願郎更詣他所。時有國子監小吏。亦同里。每出。常經其門。吏與主月俸及條報除  授。坤甚委信之。因與俱至其家。方見啟扉。有一人持水缶。注入衢中。輕雲曰。可偕入。既入。見小吏與數人會食。初。坤立於庭。以為小吏必降階迎拜。既而小吏不禮。俄見一婢捧湯餅登階。輕雲即毆婢背。遽仆於階。湯餅盡覆。小吏與妻奴俱起。驚曰。中惡。即急召巫者。巫曰。有一人。朱紱銀印。立於庭前。因祭之。坤與輕雲俱就坐。食已而偕去。女巫送到門。焚紙錢於門側。輕雲謂坤曰。郎可偕某而行。坤即隨出里中。望啟夏而去。至郊野數十里。見一墓。輕雲曰。此妾所居。郎可隨而入焉。坤即俛首曲躬而入。墓口曛黑不可辨。忽悸然驚寤。背汗股慄。時天已曉。心惡其夢。不敢語於人。是日。因召〈（明鈔本「召」作「訪」。）〉石貫。既坐。貫曰。昨夕有鬼扣吾門者三。遣視之。寂無所覩。至曉。過小吏。則有焚紙錢跡。即立召小吏。訊其事。小吏曰。某昨夕方會食。忽有婢中惡。巫云。鬼為祟。由是設祭於庭。焚紙於此。盡與坤夢同。坤益懼。因告妻孥。是歲冬。果卒。出宣室志