i tried with changing the user prompt to the following,
user_message = f"“”
other than laptop, what other electronic products are sold"“”
messages = [
{‘role’:‘system’,
‘content’: system_message},
{‘role’:‘user’,
‘content’: f"{delimiter}{user_message}{delimiter}"},
]
response = get_completion_from_messages(messages)
print(response)
the output response from step 2 reasoning as follows,
Step 1:#### The user is asking about other electronic products sold, excluding laptops.
Step 2:#### The available electronic products sold are:
-
Product: TechPro Smart TV
Category: TVs and Home Entertainment
Brand: TechPro
Model Number: TP-TV200
Warranty: 1 year
Rating: 4.6
Features: 55-inch display, 4K Ultra HD, Smart TV functionality, HDR
Description: A high-quality smart TV for an immersive viewing experience.
Price: $699.99 -
Product: BlueWave Soundbar
Category: Audio and Speakers
Brand: BlueWave
Model Number: BW-SB100
Warranty: 1 year
Rating: 4.4
Features: 2.1 channel, Bluetooth connectivity, built-in subwoofer
Description: A sleek soundbar for enhanced audio quality.
Price: $149.99 -
Product: PowerLite Wireless Earbuds
Category: Audio and Speakers
Brand: PowerLite
Model Number: PL-EB300
Warranty: 1 year
Rating: 4.2
Features: True wireless, Bluetooth 5.0, up to 20 hours of battery life
Description: Stylish and comfortable wireless earbuds for music and calls.
Price: $79.99 -
Product: TechPro Smart Watch
Category: Wearable Technology
Brand: TechPro
Model Number: TP-SW400
Warranty: 1 year
Rating: 4.3
Features: Heart rate monitor, fitness tracking, notifications, touchscreen
Description: A feature-packed smartwatch for tracking your health and staying connected.
Price: $129.99 -
Product: BlueWave Portable Bluetooth Speaker
Category: Audio and Speakers
Brand: BlueWave
Model Number: BW-PS100
Warranty: 1 year
Rating: 4.5
Features: Compact and portable, Bluetooth connectivity, up to 10 hours of playtime
Description: A portable speaker for enjoying music on the go.
Price: $49.99
In the step 2 reasoning., the AI hallucinated the products list that we have given in the system message.
i tried changing the instructions under the system message step 2 as follows, but no change, the AI just hallucinates the products.
Step 2:{delimiter} If the user is asking about
specific products, select the products that match with
the products listed below. if the user request doesn’t match with the products listed then politely mention that other categories or products not available.
then suggest the user with the available products.