AI 에이전트로 지저분한 CSV 정리하고 프로파일링하기

에이전트가 샌드박스에서 실제 명령으로 CSV를 프로파일링하고 중복, 누락 값, 잘못된 형식, 이상치를 보고합니다.

  • 파일
  • 셸
  • 예산 상한

실제 실행 보기

2026년 10월 7일에 기록된 실제 실행을 다시 재생합니다. 모델: openai/gpt-6-luna.

성공run_a95629e4250a32c985f2bd387bfe25f3$0.05 중 $0.006427
  1. 대기 중예산 $0.05 예약됨
  2. MicroVMmicroVM ready
  3. MicroVMworker started · shell on · web off
  4. 파일read orders.csv
  5. 셸$ python3 - <<'PY' import csv p='/tmp/ephemeral-run-s2TPIy/bundle/orders.csv' with open(p,newline='')…
  6. 셸$ python3 - <<'PY' import csv,re,datetime,collections p='/tmp/ephemeral-run-s2TPIy/bundle/orders.csv'…
  7. MicroVMmicroVM destroyed
  8. 성공모델 호출 3회, 토큰 9,333개기록된 출력 (영어)

    Verdict: Found data-quality issues in missing values, duplicates, email, casing, dates, and quantity.

    IssueCountAffected data rowsSuggested fix
    Missing customer_email13Populate or explicitly mark unknown.
    Missing unit_price19Populate or explicitly mark unknown.
    Duplicate full rows27, 8Remove one duplicate.
    Duplicate order_id27, 8Confirm which order is valid; make IDs unique.
    Invalid email14Correct the address (e.g., add a valid domain).
    Inconsistent country casing12Normalize de to DE.
    Inconsistent status casing112Normalize Shipped to shipped.
    Date not in YYYY-MM-DD format15Convert to 2026-09-02.
    Nonexistent date114Correct 2026-09-31 to the intended valid date.
    Negative quantity16Verify and correct the quantity.
    Extreme quantity outlier (1000)115Verify against the source order.
  9. 워커 폐기됨$0.006427 청구, $0.043573 반환
모델 $0.001027 · 웹 $0.00 · 컴퓨팅 $0.0054

직접 실행하기

요청이 모두 채워진 상태로 플레이그라운드에서 샘플을 엽니다. 내 계정에서 표시된 예산 안에서, 같은 읽기 전용 샘플 시스템을 대상으로 실행됩니다.

이 샘플의 예산: $0.05

작동 방식

파일은 읽기 전용이고 샌드박스에는 네트워크가 없어 데이터가 밖으로 나가지 않습니다. 에이전트는 눈대중이 아니라 셸로 문제를 세고, 각 문제를 행 번호와 수정 제안과 함께 나열합니다.

에이전트가 할 수 있는 일과 할 수 없는 일

권한은 요청의 일부입니다. 여기에 나열되지 않은 것은 실행에서 사용할 수 없습니다.

설정허용 범위
연결없음
웹꺼짐
셸켜짐, 밀폐된 머신 안에서
파일orders.csv (읽기 전용)
데이터 무보존꺼짐: 기록이 30일간 보관됩니다
예산$0.05, 하드 캡
시간 제한120초

자격 증명은 머신 안으로 들어가지 않습니다. 브로커가 각 호출에 자격 증명을 추가하고 위의 메서드를 강제합니다.

코드

샘플이 보내는 정확한 요청입니다. EPHEMERAL_API_KEY를 내 조직의 멤버 키로 설정하세요.

curl -X POST $EPHEMERAL_URL/v1/runs \
  -H "Authorization: Bearer $EPHEMERAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d @request.json

요청에 포함된 파일

인라인으로 전달되므로 먼저 업로드할 필요가 없습니다. 에이전트는 각각을 읽기 전용 파일로 봅니다.

orders.csv
orders.csv
order_id,customer_email,country,order_date,quantity,unit_price,status
1001,[email protected],DE,2026-09-01,2,19.90,shipped
1002,[email protected],de,2026-09-01,1,19.90,shipped
1003,,US,2026-09-02,3,9.50,shipped
1004,carla@example,US,2026-09-02,1,49.00,delivered
1005,[email protected],FR,02/09/2026,1,49.00,delivered
1006,[email protected],FR,2026-09-03,-1,19.90,refunded
1007,[email protected],US,2026-09-03,2,9.50,shipped
1007,[email protected],US,2026-09-03,2,9.50,shipped
1008,[email protected],GB,2026-09-04,1,,shipped
1009,[email protected],JP,2026-09-04,5,19.90,delivered
1010,[email protected],DE,2026-09-05,1,19.90,shipped
1011,[email protected],US,2026-09-05,1,9.50,Shipped
1012,[email protected],KR,2026-09-06,1,49.00,delivered
1013,[email protected],US,2026-09-31,2,9.50,shipped
1014,[email protected],DE,2026-09-07,1000,19.90,shipped
1015,[email protected],FR,2026-09-08,1,19.90,delivered
1016,[email protected],GB,2026-09-08,2,49.00,delivered
1017,[email protected],US,2026-09-09,1,9.50,cancelled
1018,[email protected],DE,2026-09-09,1,19.90,delivered
1019,[email protected],US,2026-09-10,2,9.50,shipped
1020,[email protected],JP,2026-09-10,1,49.00,delivered
전체 요청 본문 request.json

파일이 인라인으로 포함된 같은 본문입니다.

request.json
{
  "prompt": "Profile orders.csv (columns: order_id, customer_email, country, order_date, quantity, unit_price, status). Use the shell (python3, awk, sort, uniq, whatever is installed) to count the problems; do not count by eye. Check duplicate rows and duplicate order_ids, missing values per column, invalid emails, inconsistent country or status casing, dates that are not YYYY-MM-DD or do not exist, negative quantities and extreme outliers. Reply in Markdown, at most 220 words: a one-line verdict, then a table of issue, count, affected row numbers (data rows, header excluded) and a suggested fix. If a check finds nothing, omit it.",
  "files": [
    {
      "path": "orders.csv",
      "content": "order_id,customer_email,country,order_date,quantity,unit_price,status\n1001,[email protected],DE,2026-09-01,2,19.90,shipped\n1002,[email protected],de,2026-09-01,1,19.90,shipped\n1003,,US,2026-09-02,3,9.50,shipped\n1004,carla@example,US,2026-09-02,1,49.00,delivered\n1005,[email protected],FR,02/09/2026,1,49.00,delivered\n1006,[email protected],FR,2026-09-03,-1,19.90,refunded\n1007,[email protected],US,2026-09-03,2,9.50,shipped\n1007,[email protected],US,2026-09-03,2,9.50,shipped\n1008,[email protected],GB,2026-09-04,1,,shipped\n1009,[email protected],JP,2026-09-04,5,19.90,delivered\n1010,[email protected],DE,2026-09-05,1,19.90,shipped\n1011,[email protected],US,2026-09-05,1,9.50,Shipped\n1012,[email protected],KR,2026-09-06,1,49.00,delivered\n1013,[email protected],US,2026-09-31,2,9.50,shipped\n1014,[email protected],DE,2026-09-07,1000,19.90,shipped\n1015,[email protected],FR,2026-09-08,1,19.90,delivered\n1016,[email protected],GB,2026-09-08,2,49.00,delivered\n1017,[email protected],US,2026-09-09,1,9.50,cancelled\n1018,[email protected],DE,2026-09-09,1,19.90,delivered\n1019,[email protected],US,2026-09-10,2,9.50,shipped\n1020,[email protected],JP,2026-09-10,1,49.00,delivered\n"
    }
  ],
  "web": false,
  "shell": true,
  "timeout_seconds": 120,
  "max_cost_micros": 50000
}

더 알아보기

관련 샘플

esc

“”와(과) 일치하는 항목이 없습니다.