Databricks Certified Generative AI Engineer Associate — Question 18

What is an effective method to preprocess prompts using custom code before sending them to an LLM?

Answer options

Correct answer: D

Explanation

Option D is correct because developing a separate MLflow PyFunc model allows for effective preprocessing of prompts before they are sent to the LLM. Option A is incorrect since modifying the LLM's internal architecture is not practical or recommended. Option B is wrong as using custom preprocessing can still be beneficial, and Option C misses the point, as preprocessing can help improve the quality of inputs to the LLM rather than solely relying on postprocessing the outputs.