Kỹ thuật Prompt với OpenAI API
Fouad Trad
Machine Learning Engineer

text = "I recently purchased your XYZ Smart Watch and wanted to provide some feedback based on my experience with the product. I must say that I'm impressed with the sleek design and build quality of the watch. It feels comfortable on the wrist and looks great with any outfit. The touchscreen is responsive and easy to navigate through the various features."prompt = f"""Summarize the text delimited by triple backticks: ```{text}```""" print(get_response(prompt))
Tác giả đã mua đồng hồ XYZ và ấn tượng với thiết kế đẹp, chất lượng hoàn thiện
và độ thoải mái khi đeo. Họ thấy màn hình cảm ứng nhạy, dễ dùng để điều hướng
các tính năng của đồng hồ.

text = "I recently purchased your XYZ Smart Watch and wanted to provide some feedback based on my experience with the product. I must say that I'm impressed with the sleek design and build quality of the watch. It feels comfortable on the wrist and looks great with any outfit. The touchscreen is responsive and easy to navigate through the various features."prompt = f"""Summarize the text delimited by triple backticks in one sentence: ```{text}```""" print(get_response(prompt))
Khách hàng ấn tượng với thiết kế, chất lượng hoàn thiện, độ thoải mái và độ nhạy
của màn hình cảm ứng của đồng hồ XYZ.
text = "I recently purchased your XYZ Smart Watch and wanted to provide some feedback based on my experience with the product. I must say that I'm impressed with the sleek design and build quality of the watch. It feels comfortable on the wrist and looks great with any outfit. The touchscreen is responsive and easy to navigate through the various features."prompt = f"""Summarize the text delimited by triple backticks, in at most three bullet points. ```{text}```""" print(get_response(prompt))
- Đồng hồ XYZ có thiết kế đẹp, ấn tượng và chất lượng hoàn thiện cao.
- Đeo thoải mái và hợp với mọi trang phục.
- Màn hình cảm ứng nhạy, dễ dùng để thao tác các tính năng.
text = "I recently purchased your XYZ Smart Watch and wanted to provide some feedback based on my experience with the product. I must say that I'm impressed with the sleek design and build quality of the watch. It feels comfortable on the wrist and looks great with any outfit. The touchscreen is responsive and easy to navigate through the various features."prompt = f"""Summarize the review delimited by triple backticks, in three sentences, focusing on the key features and user experience: ```{text}```""" print(get_response(prompt))
Khách hàng mua đồng hồ XYZ và ấn tượng với thiết kế thanh lịch
và chất lượng hoàn thiện.
Họ thấy đeo thoải mái, dễ phối với mọi trang phục.
Màn hình cảm ứng nhạy, dễ sử dụng, giúp điều hướng
các tính năng của đồng hồ dễ dàng.


service_description = """Service: Social XYZ
- Social Media Strategy Development
- Content Creation and Posting
- Audience Engagement and Community Building
- Increased Brand Visibility
- Enhanced Customer Engagement
- Data-Driven Marketing Decisions"""
prompt = f"""Expand the description for the Social XYZ service delimited by triple
backticks to provide an overview of its features and benefits, without bypassing
the limit of two sentences. Use a professional tone.
```{service_description}```"""
print(get_response(prompt))
Social XYZ là dịch vụ mạng xã hội toàn diện, cung cấp phát triển chiến lược,
sáng tạo nội dung và đăng tải để giúp doanh nghiệp tương tác hiệu quả
với đối tượng mục tiêu và xây dựng cộng đồng trực tuyến vững mạnh.
Tập trung vào tăng nhận diện thương hiệu và nâng cao tương tác khách hàng,
Social XYZ giúp doanh nghiệp ra quyết định marketing dựa trên dữ liệu
để tối ưu kết quả.
Kỹ thuật Prompt với OpenAI API