John commited on
Commit
8629006
·
verified ·
1 Parent(s): bf9510a

Automatic dcft datacuration framework upload for webinstruct_stage_2_1k

Browse files
Files changed (1) hide show
  1. config/webinstruct_stage_2_1k.yaml +62 -0
config/webinstruct_stage_2_1k.yaml ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: webinstruct_stage_2_1k
2
+ operators:
3
+ # - id: load_stage_1
4
+ # config:
5
+ # type: load_preexisting
6
+ # framework_name: webinstruct_stage_1_5_10pct
7
+ # load_from_uuid: c8d4905b-ccff-4a68-a1ad-9e52227c2206
8
+
9
+ - id: load_stage_1
10
+ config:
11
+ type: load_dataset
12
+ # Completed stage 1 dataset
13
+ dataset_id: c8d4905b-ccff-4a68-a1ad-9e52227c2206
14
+
15
+ - id: sample_data_5k
16
+ config:
17
+ type: sample_data
18
+ num_samples: 5_000
19
+ max_shard: 50
20
+ input_ids:
21
+ - load_stage_1
22
+
23
+ - id: filter_dataset
24
+ config:
25
+ type: function
26
+ function: data_strategies.WebInstruct.utils.filter_dataset
27
+ function_config:
28
+ filter_column: "is_educational_and_frequent"
29
+ input_ids:
30
+ - sample_data_5k
31
+
32
+ - id: truncate_dataset_1k
33
+ config:
34
+ type: sample_data
35
+ num_samples: 1_000
36
+ input_ids:
37
+ - filter_dataset
38
+
39
+ - id: process_stage_2
40
+ config:
41
+ type: function
42
+ function: data_strategies.WebInstruct.utils.completions_with_remote_backup
43
+ function_config:
44
+ user_message_column: text
45
+ output_column: extracted_text
46
+ system_message: |-
47
+ You are given a set of pre-processed documents, each of which may contain natural question-answer (Q-A) pairs. Your task is to identify and extract these pairs while ignoring unrelated content such as ads, markup, or boilerplate text.
48
+ Input: Each document contains multiple sections of text. Some of these sections may have clear questions followed by answers, while others may be irrelevant (e.g., ads or noise).
49
+ Output: Extract the Q-A pairs found within each document. A valid Q-A pair must consist of a clearly defined question and its corresponding answer. If no natural Q-A pair exists in the document, return only the word "void" for that document.
50
+ reannotation: false
51
+ gcs_backup_path: gs://dcft-data-gcp/backups/webinstruct_stage_2_1k
52
+ input_ids:
53
+ - truncate_dataset_1k
54
+
55
+ - id: drop_void
56
+ config:
57
+ type: function
58
+ function: data_strategies.WebInstruct.utils.drop_void
59
+ function_config:
60
+ input_column: extracted_text
61
+ input_ids:
62
+ - process_stage_2