sparrow8i8 commited on
Commit
a55fa82
·
verified ·
1 Parent(s): 562a824

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +62 -0
README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ task_categories:
4
+ - text-generation
5
+ tags:
6
+ - agentic
7
+ - tool-use
8
+ - function-calling
9
+ - multi-turn
10
+ - error-recovery
11
+ size_categories:
12
+ - 1K<n<10K
13
+ ---
14
+
15
+ # Agentic Tool-Use Recovery (SFT)
16
+
17
+ Synthetic multi-turn tool-use trajectories that teach **recovery from failed tool results** and **query reformulation**, the specific gap observed when a Qwen2.5-7B model SFT'd on APIGen-MT (happy-path only) was evaluated on TAC: it called tools correctly but, when a search returned empty, it re-issued near-identical queries in a loop instead of adapting, and rarely completed the task.
18
+
19
+ Each trajectory follows a travel-booking agent that must `search_experiences` → `get_experience_details` → `check_availability` → `purchase_tickets`. The training signal is what to do when a search comes back empty.
20
+
21
+ ## Recovery patterns (balanced, ~25% each)
22
+
23
+ - **broad_to_city** — first search uses a too-broad location (country / state / island) → empty → narrow to the city → results → book.
24
+ - **two_wrong_then_city** — two over-broad/wrong location strings fail before narrowing to the city.
25
+ - **keyword_refine** — city search returns many results → use the `query` keyword field to narrow to the right one.
26
+ - **bad_query_recover** — an over-narrow/garbled `query` returns empty → broaden the keyword → results → book.
27
+
28
+ ## Schema
29
+
30
+ JSONL, one trajectory per line:
31
+
32
+ ```json
33
+ {
34
+ "messages": [
35
+ {"role": "system", "content": "..."},
36
+ {"role": "user", "content": "..."},
37
+ {"role": "assistant", "content": "reasoning...", "tool_calls": [{"id": "...", "type": "function", "function": {"name": "search_experiences", "arguments": {"location": "Ireland"}}}]},
38
+ {"role": "tool", "tool_call_id": "...", "name": "search_experiences", "content": "No experiences found for 'Ireland'. ..."},
39
+ {"role": "assistant", "content": "...", "tool_calls": [{"...": "search Galway ..."}]},
40
+ {"role": "tool", "...": "Found N experiences ..."},
41
+ "... details -> availability -> purchase ...",
42
+ {"role": "assistant", "content": "All set! I booked ..."}
43
+ ],
44
+ "tools": [ /* OpenAI-style function schemas */ ],
45
+ "metadata": {"city": "...", "country": "...", "target_id": "...", "category": "...", "pattern": "...", "num_tickets": 1}
46
+ }
47
+ ```
48
+
49
+ - `tool_calls[].function.arguments` is a **dict** (Qwen2.5 `apply_chat_template` friendly; if your trainer wants a JSON string, `json.dumps` it).
50
+ - Apply your chat template with `tools=row["tools"]`. Mask the loss to assistant turns only.
51
+
52
+ ## Intended use
53
+
54
+ Mix as roughly **40%** of a small tool-use SFT set, with ~60% APIGen-MT (the multi-turn backbone), for ~3 epochs. This dataset teaches *recovery*, not the happy path, so it is meant to be combined, not used alone.
55
+
56
+ ## Caveats
57
+
58
+ - **Synthetic / templated.** Realistic in structure, not scraped. Phrasing variety comes from template pools, not per-sample LLM generation.
59
+ - **Benign bookings only.** The booked options are welfare-neutral (hiking, snorkeling reefs, cooking classes, etc.). This set targets *completion/recovery*, not welfare selection; do not expect it to move a welfare metric.
60
+ - **Not a benchmark.** Training data only; there is no held-out eval here.
61
+
62
+ Generated 2026-07-02 with a deterministic seed. See `gen_agentic_recovery.py`.