Abstract:Ideological risk prevention is a key area related to national rejuvenation, national sovereignty and cultural construction. Today, as artificial intelligence technology is booming, generative AI technology represented by ChatGPT has been penetrated into the society. And with the expansion of the depth and scope of its interactions, it has wrapped up with many ideological risks with new characteristics. The prerequisite of preventing the ideological risk of generative AI, such as ChatGPT, is to clearly identify its internal mechanism. It makes an infiltration into people's ideological value by virtue of its primary function, which is generating contents. It affects the discourse of people's ideology by virtue of a form of interaction and dialogue with them. It strongly gets involve in people's practices and their social life by virtue of the function of multi-dimensional application, eventually it has led to the current ideological struggle to be extremely controversial and ever-changing. The key to prevent the ideological risk of generative AI, such as ChatGPT, is to take rational examination and precise identification on it. From the perspective of ideological leader, the capital logic embedded in its operation mechanism deconstructs the cognition and values already formed by members of the society, and leads to the risk of ineffective ideological leadership due to the dual advantages of "technology-capital". From the perspective of ideological discourse, it provides a new discourse mode of "human-machine collaboration", which weakens the depth of mainstream ideological discourse. And its multiple generative discourse delivery has abated the authority of discourse, resulting in the risk of eroding ideological discourse. From the perspective of ideological management, the new paradigm of information dissemination triggered by generative AI has eliminated the dominant right of ideology management and strengthened its control over people, which brought about the risk of weakening ideological management. Generative AI, such as ChatGPT, takes technological iteration as an opportunity of the times, and on the material basis of advanced technology, it has led to a series of ideological risks with extensiveness, comprehensiveness and uncertainty. How to prevent the ideological risks brought about by ChatGPT and other generative AI has become a new topic that cannot be avoided in China's ideological construction. First, we must stick to the value of "putting the people first", regard Marxist theory as the guideline of ideological prevention, and promote the building of a cyberspace with human-machine harmony and clean air. Second, we need to build a discourse channel with Chinese characteristics, and break the modern dilemma of Western discourse on the basis of discourse of telling a good Chinese story. Lastly, we need to actively advocate for global governance and contribute to China's solutions. We must uphold the principle of extensive consultation, joint contribution and shared benefits, rely on the carrier of a community with a shared future for mankind, and build a responsible landscape of artificial intelligence. By doing so, generative AI is prompted to show its bright future in the face of modern civilization.