Filed:2024-08-23Pub:2026-02-26
Applicant:Microsoft Corporation
Aspects of the disclosure include methods and systems for content moderation, and specifically dynamic multimodal prompt generation for efficient content moderation. A method includes receiving, by a prompt generation system, a request for a decision corresponding to content. The method includes generating, by an encoder of the prompt generation system, an embedding of the content, and retrieving, by an embedding based retrieval (EBR) module of the prompt generation system, K retrieved chunks from a database, the K retrieved chunks having a Kth closest distance to the embedding in an embedding space. A dynamic prompt comprising a prompt template, multiple retrieved chunks of the K retrieved chunks, and the content is generated and input to a pre-trained large language model. The LLM generates the decision, which is returned responsive to the request.