Skillpedia
الأوامر والنماذج اللغوية48k · #3718

ai-prompt-regression-testing

ما الذي تفعله

تساعد هذه المهارة على مقارنة طريقة إجابة الذكاء الاصطناعي عن الأسئلة قبل تغيير تعليماته وبعده. تضمن أن التغييرات لا تفسد الإجابات القديمة الصحيحة.

متى تستخدمها

  • ✓عندما تختبر ما إذا كان تغيير تعليمات الذكاء الاصطناعي قد أفسد شيئًا.
  • ✓عندما تتحقق مما إذا كان الذكاء الاصطناعي ما زال يتبع القواعد المهمة، مثل عدم اختلاق الحقائق.
  • ✓عندما تسجل قرارًا بشأن جودة الإجابات حين تكون النتائج غير واضحة.

رابط المهارة

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ai-prompt-regression-testing/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ai-prompt-regression-testing/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“قارن إجابات الذكاء الاصطناعي على هذه الأسئلة الخمسة قبل تغيير التعليمات وبعده. وتحقق مما إذا كان ما يزال يتبع القواعد.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تزودك المهارة بمجموعة ثابتة من الأسئلة والإجابات المتوقعة. ثم تقارن إجابات الذكاء الاصطناعي مع التعليمات الجديدة بالإجابات القديمة. يسجل النظام ما إذا كان هناك شيء قد تعطل.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

AI Prompt Regression Testing

When to Use

  • Compare a prompt change with an observed baseline on a fixed evaluation set.
  • Detect schema, factuality, refusal, tool-selection or task-completion regressions.
  • Record a reviewable decision when results are noisy, missing or contradictory.

Workflow

  1. Define the task, representative cases and forbidden outcomes. Use synthetic or approved/redacted data; freeze case IDs and the dataset revision before runs.
  2. Record baseline/candidate prompt digests, exact available model/version, inference settings, tool versions and evaluation environment. Do not hardcode old model-family options or silently change models between comparisons.
  3. Predeclare checks and acceptance rules. Use deterministic schema/field checks for structured output, behavioral checks for tools and a clear human/rubric standard for open text. Similarity does not prove factual or code correctness.
  4. Run matched baseline/candidate cases under the same permissions and budget. Record latency/cost and repeated runs when variability matters. A timeout, missing output or judge error is incomplete, not a pass or a zero-cost result.
  5. Treat judge outputs as evidence with limitations. Blind/randomize presentation where feasible, calibrate against human-labeled examples, and record judge identity/rubric. Do not ask a model to verify private reasoning or accept a judge's confidence as an objective correctness measurement.
  6. Review differences case by case and report the denominators, failures and uncertainty. Keep mandatory safety/schema failures visible even if aggregate similarity improves. Use the predeclared rule, not a threshold selected after results.
  7. Store a redacted report and exact artifacts at an authorized destination. Decide retain/revise/reject for the stated dataset; deployment is separate.

Regression register

Field Type Example / meaning
case_id string PTEST-001; a textual ID, not SERIAL
dataset_revision immutable reference exact case inventory, expected checks and labels
prompt_revision string baseline/candidate digest
model_runtime string exact available ID/version plus settings
check string required JSON fields or approved rubric criterion
result enum pass / fail / incomplete
evidence reference redacted actual output, tool trace or observed check
judge_configuration optional object exact judge ID/rubric/version and calibration limits
latency_ms nonnegative number or null null if not observed; never invented
cost amount/currency or null actual billing basis; unknown remains unknown
run_revision immutable reference binds the report to the actual run

IDs and statuses must have consistent SQL/JSON/CSV representations. Do not store private prompts, user messages or tokens in a public spreadsheet or Notion register.

Worked example

Two cases test a support-answer prompt. PTEST-001 requires an answer grounded in the supplied policy; PTEST-002 requires a structured escalation when the policy is absent. The candidate sounds more helpful but PTEST-002 has no observed result. The report is incomplete, not a win. The following Python 3 helper aggregates already reviewed case statuses; it does not call models or decide correctness.

def summarize_regression(results, expected_case_ids):
    if not isinstance(expected_case_ids, list) or not expected_case_ids:
        return {"status": "incomplete", "reason": "missing case inventory"}
    if any(not isinstance(case, str) or not case for case in expected_case_ids):
        return {"status": "incomplete", "reason": "invalid case IDs"}
    if len(set(expected_case_ids)) != len(expected_case_ids):
        return {"status": "incomplete", "reason": "duplicate expected case IDs"}
    if not isinstance(results, list) or any(not isinstance(row, dict) for row in results):
        return {"status": "incomplete", "reason": "invalid results"}
    by_id = {}
    for row in results:
        case = row.get("case_id")
        if not isinstance(case, str) or case not in expected_case_ids or case in by_id:
            return {"status": "incomplete", "reason": "unexpected or duplicate result"}
        if row.get("result") not in ("pass", "fail", "incomplete"):
            return {"status": "incomplete", "reason": "unknown result"}
        by_id[case] = row["result"]

…
الأسئلة الشائعة

ما هو «التراجع»؟

التراجع يعني أن شيئًا كان يعمل من قبل توقف عن العمل بعد تغيير ما.

هل أحتاج إلى مجموعة بيانات خاصة؟

نعم، تحتاج إلى مجموعة من الأسئلة والإجابات لتستخدمها كمرجع للمقارنة. يجب أن تكون ثابتة ومراجعة.

هل تحل هذه المهارة محل الاختبار العادي؟

لا، هذه المهارة مخصصة لنوع محدد من الاختبار: التحقق من أن تغييرات التعليمات لم تجعل الإجابات الموجودة أسوأ.

التفاصيل

الوصف الأصلي من المؤلف

Use when comparing prompt changes against a fixed evaluation set: record actual model settings, required checks, missing results, judge limitations and case-level regression evidence.

repo: sickn33/agentic-awesome-skills

الشعبية

نجوم GitHub
48k
الترتيب
#3718
الترخيص
MIT
آخر تحديث
15‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة