C1M4 - Suggestions for improvement of assignment

The exercise asked students to write a function to determine whether it is FAQ or product enquiry. Before the function exercise, it has already loaded the FAQ list by
FAQ = joblib.load(“dataset/faq.joblib”).

Thus, by natural instinct, this list should be feeded into the function as input param to construct the prompt. But the exercise haven’t and just ask to provide few shot examples to let llm “guess” whether it is FAQ.
def check_if_faq_or_product(query: str) → str:

I think a better approach would be to feed the full list of FAQ questions into the function to construct the prompt. The FAQ question list can be constructed by
faq_question_list = “\n”.join([item[“question”] for item in FAQ])

def check_if_faq_or_product(query: str, faq_question_list: str) → str:

Just my two cents. Counter argument of course welcome.

@jackchan.hk

kindly which lab you are referring like if it is graded or ungraded, or mentioning the lab assignment name also will help for mentor to cross check on your suggestions.

Regards

DP

1 Like