BackTrang chủ

PROMPT EVAL · 101

Prompt Eval 101

Evaluate an AI prompt in 30 seconds — classify support tickets with Claude, then use an LLM judge to grade the reasoning.Đánh giá một AI prompt trong 30 giây — phân loại support ticket bằng Claude, sau đó dùng LLM judge để chấm điểm lập luận.

Based on Dựa theo anthropic.skilljar.com/claude-with-the-anthropic-api →

2026-04-20 0:45 PythonStreamlitClaudeEvaluation
Watch full-length version → Xem bản đầy đủ →

Demo end-to-end nhỏ gọn để hiểu cách evaluate một classifier prompt:

  1. Phân loại ticket hỗ trợ khách hàng thành 1 trong 5 danh mục bằng Claude.
  2. Chấm điểm lập luận bằng một Claude call thứ hai đóng vai judge (thang điểm 1–5).
  3. Phát hiện lỗi — ticket #8 bị phân loại sai cố ý để bạn thấy một row xấu trông như thế nào.

Mock mode chạy offline với output đã tính sẵn, bạn có thể tương tác với UI trước khi cắm API key.

Chạy local

pip install -r requirements.txt
streamlit run app.py                     # mock mode
ANTHROPIC_API_KEY=sk-ant-… streamlit run app.py   # live mode

A tiny end-to-end demo showing how to evaluate a classifier prompt:

  1. Classify customer-support tickets into one of 5 categories using Claude.
  2. Grade the reasoning with a second Claude call acting as judge (1–5 score).
  3. Spot a failure — ticket #8 is intentionally misclassified so you can see what a bad row looks like.

Mock mode runs offline with pre-computed outputs, so you can play with the UI before plugging in an API key.

Run locally

pip install -r requirements.txt
streamlit run app.py                     # mock mode
ANTHROPIC_API_KEY=sk-ant-… streamlit run app.py   # live mode

Source