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!
== Format Conversion == === 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> === Structure the Reply in Nested JSON Format === Desired format: <pre> { "output": { "keywords": ["keyword1", "keyword2", "keyword3", "..."], "summary": "A concise overview that captures the key elements and core ideas of the subject." } } </pre> The prompt: <pre> Organize the response in a JSON structure. Use the primary key "output" that encompasses two nested keys: "keywords" and "points". Additionally, include a "summary" under the "output" key. </pre> === Convert a transcript into article === 提示文字的效果 * 改成通順的文章:將文章改成通順的文章,並加上標點符號 * 分段:適當地分段 將採訪逐字稿,轉成通順的文章 * 「請將文章改成通順與分段的文章:{{kbd | key=接上文章}}」 * 或「請整理成分段且通順的文章,並在每個段落加上黑體的副標題:{{kbd | key=接上逐字稿}}」 * 或 Convert the transcript into article: {{kbd | key=接上文章}} * 或 Convert the transcript into a blog article: {{kbd | key=接上文章}} * 或 幫我整理成通順的文章: {{kbd | key=接上文章}}<ref>[https://www.facebook.com/groups/2152027081656284/?multi_permalinks=2153876181471374&hoisted_section_header_type=recently_seen ChatGPT 生活運用 | Facebook]</ref> 將採訪逐字稿,轉成通順的文章(加上標點符號),並且摘要重點 * 「summarize the transcript into a fluent article:{{kbd | key=接上文章}}」 === Convert to table === Prompt: * "Convert to table: {{kbd | key=接上文章}}"<ref>[https://www.facebook.com/groups/aicomunity/posts/3450445248608199/ ChatGPT Experts | Nice trick "Convert to table": | Facebook]</ref> * 或「請將下面文章整理成表格,欄位是 (1) {{kbd | key=欄位}}: {{kbd | key=接上文章}}」
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