Spesenabrechnungen mit KI gegen die Unternehmensrichtlinie prüfen

Ein Agent liest eine Richtlinie und eine Liste von Ausgaben und markiert jeden Verstoß mit der Klausel, gegen die er verstößt.

  • Dateien
  • Budgetlimit

Eine echte Ausführung ansehen

Eine echte Ausführung vom 7. Okt. 2026, erneut abgespielt. Modell: openai/gpt-6-luna.

Erfolgreichrun_ae931be673f63d34dfc866fd9f435b33$0.00491 von $0.03
  1. In WarteschlangeBudget $0.03 reserviert
  2. MicroVMmicroVM ready
  3. MicroVMworker started · shell off · web off
  4. Dateiread expense-policy.md
  5. Dateiread expenses.csv
  6. MicroVMmicroVM destroyed
  7. Erfolgreich2 Modellaufrufe, 3,564 TokensAufgezeichnete Ausgabe (Englisch)
    json
    {
      "violations": [
        {
          "line": 2,
          "clause": 1,
          "reason": "The expense includes wine, and alcohol is never reimbursed."
        },
        {
          "line": 6,
          "clause": 2,
          "reason": "The $52 expense is missing a receipt."
        },
        {
          "line": 7,
          "clause": 5,
          "reason": "The Sunday ride has no note naming a business reason."
        },
        {
          "line": 9,
          "clause": 6,
          "reason": "This expense is an exact duplicate of line 10."
        },
        {
          "line": 10,
          "clause": 6,
          "reason": "This expense is an exact duplicate of line 9."
        },
        {
          "line": 5,
          "clause": 4,
          "reason": "$410 for two nights is $205 per night, exceeding the $180 limit."
        },
        {
          "line": 12,
          "clause": 4,
          "reason": "$205 for one night exceeds the $180 per-night limit."
        }
      ],
      "needs_human": [
        {
          "line": 2,
          "question": "How many people were covered by this meal, so the $60 per-person daily limit can be checked?"
        },
        {
          "line": 3,
          "question": "Was this 11-hour business-class flight approved in advance by a director?"
        },
        {
          "line": 6,
          "question": "Was the airport taxi taken for a business trip?"
        },
        {
          "line": 7,
          "question": "Was this ride part of a business trip?"
        }
      ],
      "compliant_lines": 4
    }
  8. Worker zerstört$0.00491 berechnet, $0.02509 freigegeben
Modell $0.00091 · Web $0.00 · Rechenleistung $0.004

Selbst ausführen

Öffnen Sie das Beispiel im Playground, mit der vollständig ausgefüllten Anfrage. Es läuft in Ihrem eigenen Konto, innerhalb des angezeigten Budgets, gegen dieselben schreibgeschützten Beispielsysteme.

Budget für dieses Beispiel: $0.03

So funktioniert es

Sowohl die Richtlinie als auch die Ausgabenzeilen sind schreibgeschützte Dateien. Die Antwort nennt zu jeder Markierung die Zeilennummer und die Klauselnummer, sodass ein Prüfer sie in Sekunden verifizieren kann. Zeilen, die der Richtlinie entsprechen, werden nicht aufgeführt.

Was der Agent tun kann und was nicht

Die Berechtigungen sind Teil der Anfrage. Alles, was hier nicht aufgeführt ist, steht der Ausführung nicht zur Verfügung.

EinstellungErlaubt
VerbindungenKeine
WebAus
ShellAus
Dateienexpense-policy.md, expenses.csv (schreibgeschützt)
Null-DatenspeicherungAus: Das Protokoll wird 30 Tage lang gespeichert
Budget$0.03, ein festes Limit
Timeout60 Sekunden

Zugangsdaten gelangen nie in die Maschine: Ein Broker ergänzt sie bei jedem Aufruf und erzwingt die oben genannten Methoden.

Der Code

Das ist die genaue Anfrage, die das Beispiel sendet. Setzen Sie EPHEMERAL_API_KEY auf einen Mitgliedsschlüssel Ihrer Organisation.

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

Dateien in der Anfrage

Inline übergeben, es wird also nichts vorher hochgeladen. Der Agent sieht jede einzelne als schreibgeschützte Datei.

expense-policy.md
expense-policy.md
# Expense policy

1. Meals: at most 60 USD per person per day. Alcohol is never reimbursed.
2. Every expense of 25 USD or more needs a receipt.
3. Flights: economy class only, unless the flight is longer than 8 hours and a director approved it in advance.
4. Hotels: at most 180 USD per night.
5. Taxis and rides: only for business trips; weekend rides need a note naming the business reason.
6. The same expense must not be claimed twice.
expenses.csv
expenses.csv
line,date,employee,category,description,amount_usd,receipt,approved_by
1,2026-09-14,a.nguyen,meal,Team lunch (4 people),88.00,yes,
2,2026-09-14,a.nguyen,meal,Wine with client dinner,64.00,yes,
3,2026-09-15,b.keller,flight,Frankfurt to Tokyo business class (11h),4210.00,yes,
4,2026-09-15,b.keller,flight,Tokyo to Frankfurt economy (11h),980.00,yes,
5,2026-09-16,c.ortiz,hotel,Hotel Osaka 2 nights,410.00,yes,
6,2026-09-17,c.ortiz,taxi,Airport taxi,52.00,no,
7,2026-09-20,d.smith,taxi,Sunday ride home,31.00,yes,
8,2026-09-21,a.nguyen,meal,Breakfast,14.50,no,
9,2026-09-22,e.rossi,flight,Milan to Berlin economy,210.00,yes,
10,2026-09-22,e.rossi,flight,Milan to Berlin economy,210.00,yes,
11,2026-09-23,f.hall,meal,Dinner (1 person),47.00,yes,
12,2026-09-24,c.ortiz,hotel,Hotel Kyoto 1 night,205.00,yes,
Vollständiger Anfragetext request.json

Derselbe Text, mit den Dateien inline.

request.json
{
  "prompt": "Check every line of expenses.csv against expense-policy.md. Reply with one JSON object and nothing else: {\"violations\": [{\"line\": number, \"clause\": number, \"reason\": string}], \"needs_human\": [{\"line\": number, \"question\": string}], \"compliant_lines\": number}. Report a violation only when the file proves it. When a rule cannot be checked from the data (for example advance approval), put the line in needs_human instead of guessing. A line can appear more than once if it breaks several clauses.",
  "files": [
    {
      "path": "expense-policy.md",
      "content": "# Expense policy\n\n1. Meals: at most 60 USD per person per day. Alcohol is never reimbursed.\n2. Every expense of 25 USD or more needs a receipt.\n3. Flights: economy class only, unless the flight is longer than 8 hours and a director approved it in advance.\n4. Hotels: at most 180 USD per night.\n5. Taxis and rides: only for business trips; weekend rides need a note naming the business reason.\n6. The same expense must not be claimed twice.\n"
    },
    {
      "path": "expenses.csv",
      "content": "line,date,employee,category,description,amount_usd,receipt,approved_by\n1,2026-09-14,a.nguyen,meal,Team lunch (4 people),88.00,yes,\n2,2026-09-14,a.nguyen,meal,Wine with client dinner,64.00,yes,\n3,2026-09-15,b.keller,flight,Frankfurt to Tokyo business class (11h),4210.00,yes,\n4,2026-09-15,b.keller,flight,Tokyo to Frankfurt economy (11h),980.00,yes,\n5,2026-09-16,c.ortiz,hotel,Hotel Osaka 2 nights,410.00,yes,\n6,2026-09-17,c.ortiz,taxi,Airport taxi,52.00,no,\n7,2026-09-20,d.smith,taxi,Sunday ride home,31.00,yes,\n8,2026-09-21,a.nguyen,meal,Breakfast,14.50,no,\n9,2026-09-22,e.rossi,flight,Milan to Berlin economy,210.00,yes,\n10,2026-09-22,e.rossi,flight,Milan to Berlin economy,210.00,yes,\n11,2026-09-23,f.hall,meal,Dinner (1 person),47.00,yes,\n12,2026-09-24,c.ortiz,hotel,Hotel Kyoto 1 night,205.00,yes,\n"
    }
  ],
  "shell": false,
  "timeout_seconds": 60,
  "max_cost_micros": 30000
}

Mehr erfahren

Ähnliche Beispiele

esc

Keine Treffer für „“.