As a mainstream method in current natural language processing tasks, the “pre-train, fine-tune” method has achieved quite good results in various scenarios. However, the “pre-train, fine-tune” method performs poorly on few-shot learning tasks. Recently, prompt learning has gained popularity. Prompt learning transforms various types of natural language processing tasks into pre-training tasks and shows good results on few-shot learning tasks. The prompt learning method based on entity pair type question answering proposed in this paper creatively applies the prompt learning method successfully to the Chinese medical relationship extraction task. The proposed model shows good results on both full data and and low resource datasets. Background Chinese medical relation extraction is an important step in building a complete medical knowledge system. Although the “pre-train, fine-tune” paradigm has shown good results in the Chinese medical relationship extraction task, the “pre-train, fine-tune” paradigm has slow model convergence, and the results are not satisfactory in the small-sample relationship extraction task. These problems are related to the scarcity of accurately labelled medical text data and the large differences between upstream and downstream models. Results Given the aforementioned problems, we propose a prompt learning method that is based on entity pair type question answering. To start with, we preprocessed the Chinese medical text dataset by transforming the data into a sentence-level relation extraction form, which is more appropriate for prompt learning. The relationship template is then devised by combining entity types, which effectively address the issue of expressing the Chinese medical relationship in an accurate and brief manner. Following the fine-tuning of the pre-trained model, this method can accurately restore the mask and present very competitive outcomes on the full data and low resource data of numerous Chinese medical datasets. Conclusions The method proposed in this paper is superior to the traditional “pre-train, fine-tune” approach, as it can efficiently extract the connections between Chinese medical entities. This method is particularly effective when dealing with small sample datasets. The efficiency of the model can be further improved by using the relationship filtering method which is based on the relevant rules of the Chinese medical entities.