Halaman ini membahas preambul kustom dan cara menulis preambul untuk meningkatkan kualitas jawaban yang dihasilkan dari Answer API.
Preamble menetapkan konteks dan ekspektasi awal untuk LLM sebelum memproses dokumen input Anda. Preamble memengaruhi kualitas ringkasan yang dihasilkan. Ada preamble default yang diberikan setiap kali Anda memanggil metode answer. Namun, Anda memiliki opsi untuk menentukan preamble Anda sendiri, bukan menggunakan preamble default.
Untuk mengetahui petunjuk tentang cara menentukan preamble dalam panggilan metode jawaban, lihat Menentukan preamble kustom.
Misalnya, Anda dapat menggunakan preamble untuk melakukan hal berikut:
Menentukan kata yang dapat dan tidak dapat digunakan oleh model.
Menentukan topik yang akan difokuskan atau dihindari.
Menentukan gaya, nada, dan format respons.
Menyesuaikan preamble dapat meningkatkan kualitas ringkasan secara signifikan.
Pembukaan harus memiliki dua bagian:
Deskripsi tugas yang menjelaskan tugas yang Anda minta agar dilakukan LLM. Lihat Contoh deskripsi tugas.
Petunjuk tambahan yang harus diikuti LLM. Lihat Contoh dan tips untuk petunjuk tambahan.
Contoh deskripsi tugas
Berikut beberapa contoh deskripsi tugas. Skenarionya adalah karyawan Anda menginginkan jawaban dari penyimpanan data yang berisi banyak dokumen perusahaan.
Contoh 1
Deskripsi tugas untuk mengutip sumber secara komprehensif:
Given a user query and a list of sources, write a response that cites individual
sources as comprehensively as possible.
Contoh 2
Deskripsi tugas untuk memahami pengguna dan berfokus pada kegunaan:
You are an enterprise LLM summarization tool. Your task is to understand the
true intent of a user question in the context of enterprise search and
summarization, and provide a helpful answer to the user's question.
Contoh 3
Deskripsi tugas untuk meringkas percakapan antara pelanggan dan asisten:
Given the conversation between a customer and a helpful assistant with some
search results, create a final answer for the assistant.
Contoh dan tips untuk petunjuk tambahan
Petunjuk tambahan harus mencakup persyaratan utama spesifik Anda.
Tabel berikut memberikan contoh petunjuk tambahan yang mungkin Anda berikan setelah deskripsi tugas, jenis masalah yang diatasi oleh setiap contoh, dan alasan preamble menyelesaikan masalah tersebut.
| Masalah yang perlu diselesaikan | Solusi | Contoh |
|---|---|---|
| Jawaban harus lebih disesuaikan dengan kebutuhan bisnis | Berikan konteks dan petunjuk tambahan untuk memastikan ringkasan disesuaikan dengan kasus penggunaan dan target audiens tertentu. |
Contoh 1
Utilize the specific context of the workspace (e.g. meeting notes, public
guidance, FAQ) to provide more accurate and relevant summaries.
Contoh 2
Summarize customer feedback, focusing on their pain points, feature
request and overall satisfaction. Highlight any actionable insights that
can help improve our product or service.
Contoh 3
For input documents of troubleshooting website, please summary the
problem statement, step-by-step solutions and any relevant tips or
warnings.
Contoh 4
"XYZ" is an internal forum for engineers to discuss technical problems,
you can use it to summarize technical issues, proposed solutions and any
unresolved challenges or next steps identified in the discussion.
|
| Jawaban harus dalam gaya tertentu | Tentukan dengan jelas gaya atau nuansa dan audiens yang dituju. |
Contoh 1
Summarize troubleshooting guide for customer support agent in a clear and
concise manner. The summary should be easy for a non-technical user to
understand.
Contoh 2
Summarize the technical documents for engineers. Focus on the core
functionality, system architecture, and potential challenges.
|
| Jawaban harus dalam format tertentu | Tentukan format output |
Contoh 1
Use bullet points for steps, numbered lists for rankings, tables for
comparisons, code block for coding example
Contoh 2
Summarize the key takeaways in a numbered lists
|
| Jawaban harus singkat | Perintahkan LLM secara eksplisit untuk membuat ringkasan yang "ringkas" atau "singkat". Anda juga dapat menentukan jumlah kata atau kalimat jika berlaku. |
Contoh 1
Please keep summaries concise and focused, providing only the most
essential information to address the user's query.
Contoh 2
The answer should be less than 200 words.
|
| Jawaban harus lebih komprehensif | Mendorong LLM untuk menyertakan detail penting dan poin penting. |
Contoh
Please ensure key details are included.
|
| Penyertaan topik yang dilarang | Tentukan cara model harus merespons dalam situasi tertentu. |
Contoh
For political questions, the most helpful way is to politely refuse to
answer the question.
|
| Mengurangi Halusinasi (informasi yang salah) | Tekankan pentingnya akurasi dan instruksikan LLM untuk mematuhi informasi yang disajikan dalam teks secara ketat. |
Contoh 1
Keep the summary accurate, ensuring all claims are verifiable within the given context.
Contoh 2
Use exact words from the context if possible.
|
Contoh preamble lengkap
Berikut beberapa contoh lagi pengantar lengkap, yang terdiri dari deskripsi tugas dan petunjuk tambahan.
Contoh 1
Minta ringkasan yang ringkas, akurat, dan relevan, lalu sajikan dalam format yang mudah digunakan.
You are an enterprise LLM summarization tool. Your task is to understand the
true intent of a user question in the context of enterprise search and
summarization, and provide a helpful answer to the user's question. Please keep
summaries concise and focused, providing only the most essential information to
address the user's query.
Please also structure and format the summary by
1) prioritize most relevant and accurate information to user's question
2) highlight critical information
3) structure the response and adapt the formatting to be user friendly (e.g.,
use bullet points for steps, numbered lists for rankings, tables for
comparisons, code block for coding example, etc).
Contoh 2
Berikan jawaban akhir yang ringkas, ramah, dan bermanfaat untuk kueri pelanggan berdasarkan percakapan.
Given the conversation between a customer and a helpful assistant with some
search results, create a final answer for the assistant.
The answer should addresses the query accurately and concisely (less than 10
sentences), while also being friendly and helpful. If the search results don't
provide enough information to fully answer the question, suggest additional
resources or steps the customer can take.
Contoh 3
Memberikan jawaban yang komprehensif dan mudah dipahami serta mengutip sumber yang diberikan. Tolak dengan sopan untuk menjawab pertanyaan politik apa pun.
Given a user query and a list of sources, write a response that cites individual
sources as comprehensively as possible.
The response should be suitable for a non-expert audience.
For political questions, the response should be a polite refusal to answer the
question.
Praktik Terbaik
Berikut adalah beberapa praktik terbaik untuk menulis dan menyesuaikan preamble:
Penyempurnaan Iteratif: Bereksperimenlah dengan berbagai variasi preamble dan amati dampaknya terhadap kualitas jawaban.
Masukan Pengguna: Kumpulkan masukan dari pengguna untuk mengidentifikasi masalah yang berulang dan area yang perlu ditingkatkan.
Tetap Dapatkan Info Terbaru:Efektivitas penyesuaian pengantar dapat bervariasi, bergantung pada versi model dan sifat dokumen Anda. Terus lakukan eksperimen dan sesuaikan pendekatan Anda untuk mendapatkan hasil yang optimal.
Evaluasi Menyeluruh: Memverifikasi pengantar yang diubah di semua kasus penggunaan yang dimaksudkan membantu mengidentifikasi dan mengurangi potensi bias atau perilaku yang tidak terduga yang dapat berdampak negatif pada kualitas ringkasan dalam skenario tertentu.