Databricks Generative AI Engineer Associate Question 121
Single answerYou are building a customer support chatbot using a generative AI model on Databricks. You want to augment the user’s prompt with additional context extracted from their input. For example, if a user mentions 'refund' and 'order number 12345', the augmented prompt should include information such as 'The user is asking about a refund for order number 12345'. Which approach would be most effective for achieving this?
- A
Use a keyword extraction model to identify key terms like 'refund' and 'order number', then append these to the prompt.
- B
Train a custom generative AI model to infer context without any preprocessing of user input.
- C
Apply Named Entity Recognition (NER) to extract structured entities like 'order number' and 'refund reason', then use these entities to build additional context for the prompt.
- D
Directly pass the raw user input to the generative AI model without any modifications.
Show answer and explanation
Correct answer: C
Explanation
The correct answer is to apply Named Entity Recognition (NER) to extract structured entities from the user's input. This technique allows for the identification of meaningful elements like 'order number' or 'refund reason', enabling the augmentation of the prompt with precise context. This improves the AI model's ability to generate accurate and relevant responses while avoiding unnecessary complexity like retraining the model or relying solely on raw input.
- A. Incorrect.
Using a keyword extraction model can help identify key terms but may not provide structured entities (like 'order number') necessary for creating more meaningful context.
- B. Incorrect.
Training a custom generative AI model is unnecessary for this task, as pre-trained models combined with preprocessing techniques like NER can achieve the desired results efficiently.
- C. Correct.
Applying Named Entity Recognition (NER) is an effective approach to extract structured entities from user input, such as 'order number' or 'refund reason', which can then be used to augment the prompt with additional context.
- D. Incorrect.
Passing raw user input directly to the model does not provide any additional context, potentially leading to less accurate or incomplete responses.