Editing
AI Prompt Engineering in Mandarin
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Convert the response to json === * 目的:將機器人的結果可以更結構化,減少後續資料清理的功 * 提示:「... And put your response into a JSON with keys "aaa", "bbb", "ccc":」、「分析底下這句話,直接以 JSON 回傳抓取到的資訊 ,包含 ...」<ref>[https://www.facebook.com/DotNetWalker/posts/pfbid0X6Hs5U3j3Hd6v7ddcgunUHwzAxpZTNK3NjRt9cSE5v3FPf38QGk4Lxg3AFJPtBWkl ‧NET Walker 大內行者 (2023). 既然 ChatGPT 那麼厲害,都聽得懂人話,那分析用戶的 intent 與 entities 不正是他的強項嗎?]</ref> 其他提示寫法「Provide them in JSON format with the following keys: book_id, title, author, genre.」<ref>[https://www.deeplearning.ai/short-courses/chatgpt-prompt-engineering-for-developers/ ChatGPT Prompt Engineering for Developers - DeepLearning.AI]、「Output a json object that contains the following keys: french_summary, num_names.」</ref> 修改前 <pre> Human: Write 10 keywords, sentiment and Named entity recognition for following article: 今天台北天氣真好,希望可以不用上班 AI: Keywords: Taipei, Weather, Work, Today. Sentiment: Positive. Named Entity Recognition: Taipei, Work. </pre> 修改後 <pre> Human: Write 10 keywords, sentiment and Named entity recognition for following article. And put your response into a JSON with keys "keywords", "sentiment", "entity": 今天台北天氣真好,希望可以不用上班 AI: { "keywords": ["Taipei", "weather", "not working", "today"], "sentiment": "positive", "entity": ["Taipei", "today"] } </pre> <pre> AI: I am an AI created by OpenAI. How can I help you today? Human: 分析底下這句話,直接以 JSON 回傳抓取到的資訊 ,包含 出發站(Departure)、到達站(arrival)、票種(TickeType)、數量 (Amount)、出發時間 (DepartureTime)。•我爱從台北到高雄的自由座三張,下午1:30出發。還有爾張優待票,去合中的,2:30出發 AI: { "Departure": "Taipei", "Arrival": "Kaohsiung", "TicketType": "Freedom Seats", "Amount": 3, "DepartureTime": "1:30 PM" }, { "TicketType": "Discounted", "Departure": "Hecheng", "DepartureTime": "2:30 PM" } </pre>
Summary:
Please note that all contributions to LemonWiki共筆 are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
LemonWiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Current events
Recent changes
Random page
Help
Categories
Tools
What links here
Related changes
Special pages
Page information