QuestionQ79Verified/Data PreparationCopy linkReport a problemAsk AstroTutorSave questionWhat is an effective way to preprocess prompts with custom code before they are sent to an LLM?ADirectly modify the LLM’s internal architecture to include preprocessing stepsBIt is better not to introduce custom code to preprocess prompts as the LLM has not been trained with examples of the preprocessed promptsCRather than preprocessing prompts, it’s more effective to postprocess the LLM outputs to align the outputs to desired outcomesDWrite a MLflow PyFunc model that has a separate function to process the promptsShow AnswerAnswerExplanationAn MLflow PyFunc model can implement custom inference logic with a dedicated prompt-processing function, so prompts can be transformed into the required format before the LLM is invoked.Learn moreCustom Serving ApplicationsServing LLMs with MLflow: Leveraging Custom PyFuncShow comments1Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion