จัดเวอร์ชันพรอมต์และประเมินเอาต์พุต
ติดตามการเปลี่ยนแปลงของพรอมต์และให้คะแนนคำตอบ
จัดเวอร์ชันพรอมต์และประเมินเอาต์พุต เป็นบทเรียน MLOps Academy ฟรีบน CoddyKit นี่คือบทเรียนที่ 2 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน MLOps Academy และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส MLOps Academy มีบทเรียนทั้งหมด 4 บทเรียน
บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ
Prompts Are Code
A reworded prompt can change behavior overnight. So you treat each prompt as a versioned artifact, with history, review, and the ability to roll back. 📝
Store Prompts, Not Strings
Hard-coded strings scattered in code are impossible to track. Keep prompts in a registry or files so every change is visible and diffable.
prompts/summarize_ticket.v2.txt
prompts/summarize_ticket.v3.txtTag Each Version
Give every prompt a clear version id you can pin in code. Then you always know exactly which wording produced a given output.
PROMPT_VERSION = "summarize-v3"
template = load_prompt(PROMPT_VERSION)Build an Eval Dataset
Collect real inputs with the answers you want. This eval set is your yardstick for judging whether a prompt change actually helped.
cases = [
{"input": "ticket text...", "expected": "Refund requested"},
]Score Against References
For tasks with a known answer, compare output to the expected text. A simple metric like exact match or F1 gives you a fast pass-fail signal.
Use an LLM as Judge
For open-ended text, ask another model to grade the answer against a rubric. This LLM-as-judge pattern scales scoring beyond hand-written rules.
judge_prompt = "Rate 1-5 how well the summary captures the ticket:\n{output}"Watch the Judge Itself
Judges can be biased or inconsistent. You keep them honest by spot-checking scores against a few human ratings on the same cases.
Run Evals on Every Change
Before shipping a new prompt, run it across the whole eval set. You only promote it if the score holds or improves, never on a hunch.
old = run_eval("summarize-v2")
new = run_eval("summarize-v3")
assert new.score >= old.scoreTrack Regressions
A prompt that fixes one case can break another. Comparing per-case results catches these regressions before users ever see them.
Frameworks Help
Tools like promptfoo or OpenAI Evals run datasets, call models, and report scores for you. A framework turns ad-hoc testing into a repeatable suite.
Pin the Winner
Once a version wins on your evals, pin it in production and archive the rest. You now have a clear, auditable trail from prompt to result.
Quick Check
You need to score open-ended summaries with no single correct answer. What fits best?
Recap
You learned to version prompts, build an eval set, score with metrics or an LLM judge, and gate releases on results. No more guessing! 🎉
คำถามที่พบบ่อย
บทเรียน “จัดเวอร์ชันพรอมต์และประเมินเอาต์พุต” ฟรีหรือไม่
ใช่ — ข้อความเต็มของ “จัดเวอร์ชันพรอมต์และประเมินเอาต์พุต” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส MLOps Academy ให้อัปเกรดเป็น CoddyKit PRO คอร์ส MLOps Academy มีบทเรียนทั้งหมด 4 บทเรียน
คุณจะเรียนรู้อะไรในบทเรียน “จัดเวอร์ชันพรอมต์และประเมินเอาต์พุต”
ติดตามการเปลี่ยนแปลงของพรอมต์และให้คะแนนคำตอบ คุณปฏิบัติ MLOps Academy ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน
คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน MLOps Academy หรือไม่
ไม่จำเป็นต้องมีประสบการณ์มาก่อน MLOps Academy บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 2 จากทั้งหมด 4 บทเรียน
บทเรียน “จัดเวอร์ชันพรอมต์และประเมินเอาต์พุต” ใช้เวลานานแค่ไหน
บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย
ฉันเขียนและรันโค้ดในบทเรียน MLOps Academy นี้ได้ไหม
ได้ บทเรียน MLOps Academy ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ
บทเรียนทั้งหมดในหลักสูตรนี้
- LLMOps แตกต่างจาก MLOps แบบดั้งเดิมอย่างไร
- จัดเวอร์ชันพรอมต์และประเมินเอาต์พุต
- ติดตามและตรวจสอบการเรียกใช้ LLM
- เกราะป้องกันและการประเมิน RAG