Menu
ESC

Nhập từ khóa để tìm kiếm

↑↓ Di chuyển
Enter Mở
ESC Đóng

Đang tải...

Analysis

Code Interpreter

bởi OpenAI

Sandbox Python trong ChatGPT — upload file, AI viết và chạy code phân tích, plot, transform.

Gồm trong ChatGPT Plus $20/mo (gọi là "Advanced Data Analysis") Trang chủ

Tool này là gì?

Code Interpreter (hiện đổi tên thành "Advanced Data Analysis" trong ChatGPT) là một tool feature của OpenAI — cho phép ChatGPT viết Python code và chạy trong sandbox isolated. Bạn upload file (CSV, Excel, PDF, image, ZIP), ChatGPT phân tích, transform, plot ra biểu đồ — không cần biết Python.

Định vị: "Excel + Python intern" — task nào trên Excel mà bạn không biết làm hoặc tốn 2h, Code Interpreter làm trong 2 phút. Đặc biệt mạnh cho PM cần phân tích data nhanh mà không có analyst.

Tương đương trên các platform khác: Claude có "Analysis" tool tương tự, Gemini có "Code Execution". Khái niệm "code interpreter" giờ là pattern chuẩn.

Khi nào nên dùng

Khi nào KHÔNG nên dùng

Workflow tiêu biểu

flowchart LR
    A[Upload file CSV/Excel] --> B[Mô tả task
'compute retention'] B --> C[ChatGPT viết Python] C --> D[Chạy code trong sandbox] D --> E{Output đúng?} E -->|Lỗi| F[ChatGPT tự debug
iterate] E -->|OK| G[Download
output file + chart] F --> D

Pattern: thường mất 2–3 iteration để output đẹp. Lần đầu AI thường compute thô — mình prompt thêm "make chart more visual, color by segment, add data label" — đến lần 3 chart xài được luôn cho deck.

Prompt mẫu

(Upload file users_events.csv)

Compute D-7 và D-30 retention cho cohort signup theo tuần
trong 6 tháng qua.

Steps:
1. Parse csv, identify cohort_week from signup_date
2. Cho mỗi cohort, tính % user có event trong day 7 và day 30
3. Plot heatmap: x=days_since_signup, y=cohort_week,
   color=retention%
4. Add label số % trong cell
5. Insight: cohort nào perform tốt nhất / tệ nhất + hypothesis

Export PNG chart + CSV với retention numbers.
(Upload file revenue.xlsx có 12 tab)

Consolidate 12 tab thành 1 master sheet:
- Mỗi row: month, product, revenue, units_sold
- Add cột yoy_growth_% (so cùng tháng năm trước)
- Highlight row có YoY < -10% (giảm mạnh)
- Plot line chart revenue 12 tháng, breakdown by product
- Output: file consolidated.xlsx với formatting

Bonus: gợi ý 3 product cần review chiến lược.

Mẹo nâng cao

Tip 1 — Verify code: Click vào icon "Code" để xem Python code AI chạy. Nếu mình biết Python, đọc nhanh để confirm logic đúng — đặc biệt cho phân tích quan trọng.
Tip 2 — Reuse trong session: Sau khi xử lý file lần đầu, các biến (df, models) còn trong memory. Hỏi follow-up "now plot the same data as bar chart" — không cần re-upload.
Cẩn thận: Code Interpreter có thể hallucinate kết quả — vd báo "retention 45%" mà không thực sự chạy code. Luôn check biểu đồ / output table có hợp lý không. Cross-check với câu hỏi sanity (vd total user count).

Kết hợp với công cụ khác

flowchart LR
    A[Mixpanel / BigQuery] -->|export CSV| B[Code Interpreter
analyze + plot] B --> C[Insight + chart] C --> D[Claude
viết narrative cho exec] D --> E[Gamma
convert deck]

Code Interpreter là "data layer" — input file, output insight. Claude lấy insight viết câu chuyện cho exec, Gamma convert thành slide. Pipeline classic cho PM-led data review.

So với alternatives

So vớiMạnh hơn ởYếu hơn ở
Claude AnalysisTích hợp với ChatGPT GPT Store, share GPT custom dễ hơnClaude Analysis có sandbox JS thuần — không lo Python dependency conflict
Excel + CopilotReasoning sâu hơn, plot đẹp hơn nhiều, transform phức tạp dễ hơnExcel quen thuộc, không cần upload file lên cloud
Jupyter NotebookZero setup, không cần biết Python, AI tự viếtJupyter cho power user — reproducibility, version control tốt hơn

Tài nguyên thêm