File size: 19,631 Bytes
74a7054
af1b083
fdf24d3
74a7054
 
af1b083
6fdce9f
74a7054
3b22343
17e546e
74a7054
18e92a9
 
 
ecf2eab
baaca29
18e92a9
ecf2eab
18e92a9
 
 
 
 
 
 
 
ecf2eab
 
18e92a9
 
ecf2eab
 
bdb2316
8df9e15
ecf2eab
 
 
 
 
bdb2316
 
 
17e546e
baaca29
 
 
17e546e
bdb2316
 
baaca29
bdb2316
1af3c5d
74a7054
 
6fdce9f
74a7054
 
fdf24d3
17e546e
74a7054
3b22343
 
 
74a7054
3b22343
74a7054
3b22343
 
74a7054
 
 
 
baaca29
18e92a9
 
74a7054
3b22343
74a7054
3b22343
74a7054
3b22343
74a7054
3b22343
0dc1232
 
 
17e546e
bdb2316
 
3b22343
bdb2316
 
 
0dc1232
 
 
3b22343
bdb2316
 
 
 
 
 
 
 
 
 
0dc1232
 
 
bdb2316
 
 
 
 
0dc1232
bdb2316
0dc1232
bdb2316
 
 
0dc1232
bdb2316
 
 
0dc1232
bdb2316
 
 
 
 
 
0dc1232
 
 
bdb2316
74a7054
5720bb3
bdb2316
3b22343
bdb2316
 
 
0dc1232
 
bdb2316
 
 
 
0dc1232
 
 
 
 
 
 
 
 
bdb2316
0dc1232
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bdb2316
0dc1232
 
 
 
 
 
 
 
74a7054
0dc1232
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74a7054
b07126b
3b22343
74a7054
b07126b
3b22343
74a7054
3b22343
18e92a9
74a7054
1af3c5d
74a7054
18e92a9
1af3c5d
74a7054
17e546e
 
 
 
 
 
 
18e92a9
17e546e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18e92a9
 
17e546e
 
74a7054
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17e546e
74a7054
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332

---
license: cc-by-nc-4.0
language:
- en
---
# Jellyfish-13B
<!-- Provide a quick summary of what the model is/does. -->
<img src="https://i.imgur.com/d8Bl04i.png" alt="PicToModel" width="330"/>

## Model Details
Jellyfish-13B is a large language model with 13 billion parameters, designed specifically for data managment and preprocessing tasks, such as entity matching, data imputation, error detection, and schema matching.

We fine-tuned [Open-Orca/OpenOrca-Platypus2-13B](https://huggingface.co/Open-Orca/OpenOrca-Platypus2-13B) using the datasets related to data preprocessing tasks.
Its performance is competitive, standing up well against prior state-of-the-art algorithms and LLMs such as OpenAI GPT 3.5 and GPT 4 ([evaluated by our previous work](https://arxiv.org/abs/2308.16361)).
Keep in mind that Jellyfish is only a 13B model, allowing for cost-effective local execution while maintaining data security.

|  Task  | Dataset | Non-LLM SoTA<sup>1</sup> | GPT-3.5<sup>2</sup> | GPT-4<sup>2</sup> | Jellyfish-13B| Jellyfish-13B-Resoning |
| ---- | ---- | ---- | ---- | ---- | ---- | ---- |
| Entity Matching  | Fodors-Zagats  | 100  | 100 | 100 | 100 | 100 |
| Entity Matching  | Beer           | 94.37| 96.30 | 100 | 93.33 | 100 | 
| Entity Matching  | iTunes-Amazon  | 97.06| 96.43 | 100 | 96.30 | 96.15 | 
| Entity Matching  | Walmart-Amazon | 86.76| 86.17 | 90.27 | 80.71 | 85.16 | 
| Entity Matching  | DBLP-ACM       | 98.99| 96.99 | 97.44 | 97.35 | 95.74 | 
| Entity Matching  | DBLP-GoogleScholar | 95.60| 76.12 | 91.87 | 92.83 | 89.45 | 
| Entity Matching  | Amazon-Google  | 75.58| 66.53 | 74.21 | 72.69 | 56.64 | 
| Data Imputation  |  Restaurant    | 77.20| 94.19 | 97.67 | 94.19 | 93.02 | 
| Data Imputation  |  Buy           | 96.50| 98.46 | 100 | 100 | 100 | 
| Error Detection  |  Hosptial      | 99.10| 90.74 | 90.74 | 92.21 | 65.66 | 
| Error Detection  |  Adult         | 94.40| 92.01 | 92.01 | 96.62 | 90.13 | 
| Schema Matching  |  Sythea        | 38.50| 57.14 | 66.67 | 36.36 | 30.77 |  

_Accuracy as the metric for data imputation, and the F1 score for other tasks._  
_For GPT-3.5, GPT-4 we used the few-shot approach, while for Jellyfish and Jellyfish-Reasoning, the zero-shot approach was employed._
1.  
  [Ditto](https://arxiv.org/abs/2004.00584) for Entity Matching  
  [SMAT](https://www.researchgate.net/publication/353920530_SMAT_An_Attention-Based_Deep_Learning_Solution_to_the_Automation_of_Schema_Matching) for Schema Matching  
  [HoloDetect](https://arxiv.org/abs/1904.02285) for Error Detection  
  [HoloClean](https://arxiv.org/abs/1702.00820) for Data Imputation  
2.  
  [Large Language Models as Data Preprocessors](https://arxiv.org/abs/2308.16361)
  

We release two distinct versions of Jellyfish: Jellyfish-13B (the main branch) and Jellyfish-13B-Reasoning.
As the names suggest, Jellyfish-13B is tailored to deliver precise, straightforward answers.
In contrast, Jellyfish-13B-Reasoning, is fine-tuned with data that includes reasoning and sequential thought processes for handling data preprocessing tasks, distilling knowledge from GPT-4.

The two versions are designed for different application scenarios.
Jellyfish-13B is suitable for integration into larger data management systems due to its simple and clear responses that can be easily transformed into code.
On the other hand, Jellyfish-13B-Reasoning is more user-oriented, with responses that provide them with in-depth data insights without the necessity for advanced coding skills or an intricate grasp of statistics.

**Jellyfish paper will be coming soon!**

- **Developed by:** Haochen Zhang, Yuyang Dong, Chuan Xiao, Masafumi Oyamada
- **Contact: [email protected]**
- **Funded by:** NEC Corporation, Osaka University
- **Language(s) (NLP):** English
- **License:** Non-Commercial Creative Commons license (CC BY-NC-4.0)
- **Finetuned from model:** [Open-Orca/OpenOrca-Platypus2-13B](https://huggingface.co/Open-Orca/OpenOrca-Platypus2-13B)

## Prompt Template
```
### Instruction:

<prompt> (without the <>)

### Response:
```

## Training Details

### Training Data
We utilized the training and validation sets from the paper [Can Foundation Models Wrangle Your Data?](https://arxiv.org/abs/2205.09911) to fine-tune Jellyfish.
The original datasets is [HazyResearch/fm_data_tasks](https://github.com/HazyResearch/fm_data_tasks).
We revised this data and constructed an instruction tuning dataset suitable for fine-tuning LLM, mirroring the style of [OpenOrca](https://huggingface.co/datasets/Open-Orca/OpenOrca).

### Training Method

We used LoRA to speed up the training process, targeting the q_proj and v_proj modules.

## Uses

<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
We provide the prompts used for both the model's fine-tuning and inference.
You can structure your data accordingly to these prompts.
However, we encourage experimenting with different prompts to potentially achieve optimal generation quality.

### JellyFish-13B
#### For Entity Matching
```
You are tasked with determining whether two records listed below are the same based on the information provided.
Carefully compare the {attribute 1}, {attribute 2}... for each record before making your decision.  
Note: Missing values (N/A or \"nan\") should not be used as a basis for your decision.  
Record A: [{attribute 1}: {attribute 1 value}, {attribute 2}: {attribute 2 value}, ...]
Record B: [{attribute 1}: {attribute 1 value}, {attribute 2}: {attribute 2 value}, ...]  
Are record A and record B the same entity? Choose your answer from: [Yes, No].
```
#### For Data Imputation
```
You are presented with a {keyword} record that is missing a specific attribute: {attribute X}.
Your task is to deduce or infer the value of {attribute X} using the available information in the record.  
You may be provided with fields like {attribute 1}, {attribute 2}, ... to help you in the inference.  
Record: [{attribute 1}: {attribute 1 value}, {attribute 2}: {attribute 2 value}, ...]  
Based on the provided record, what would you infer is the value for the missing attribute {attribute X}?  
Answer only the value of {attribute X}.
```
#### For Error Detection
_There are two forms of the error detection task.
In the first form, a complete record row is provided, and the task is to determine if a specific value is erroneous.
In the second form, only the value of a specific attribute is given, and the decision about its correctness is based solely on the attribute's name and value.
The subsequent prompt examples pertain to these two forms, respectively._
```
Your task is to determine if there is an error in the value of a specific attribute within the whole record provided.
The attributes may include {attribute 1}, {attribute 2}, ...
Errors may include, but are not limited to, spelling errors, inconsistencies, or values that don't make sense given the context of the whole record.
Record [{attribute 1}: {attribute 1 value}, {attribute 2}: {attribute 2 value}, ...]
Attribute for Verification: [{attribute X}: {attribute X value}]
Question: Is there an error in the value of {attribute X}? Choose your answer from: [Yes, No].
```
```
Your task is to determine if there is an error in the value of a specific attribute.
The attributes may belong to a {keyword} record and could be one of the following: {attribute 1}, {attribute 2}, ...
Errors can include, but are not limited to, spelling errors, inconsistencies, or values that don't make sense for that attribute.  
Note: Missing values (N/A or \"nan\") are not considered errors.
Attribute for Verification: [{attribute X}: {attribute X value}]
Question: Is there an error in the value of {attribute X}? Choose your answer from: [Yes, No].
```
#### For Schema Matching
```
Your task is to determine if the two attributes (columns) are semantically equivalent in the context of merging two tables.
Each attribute will be provided by its name and a brief description.
Your goal is to assess if they refer to the same information based on these names and descriptions provided.
Attribute A is [name: {value of name}, description: {value of description}].
Attribute B is [name: {value of name}, description: {value of description}].
Are Attribute A and Attribute B semantically equivalent? Choose your answer from: [Yes, No].
```

### JellyFish-13B-reasoning
#### For Entity Matching
```
You are tasked with determining whether two products listed below are the same based on the information provided.
Carefully examine all the attributes before making your decision.  
Note: Missing values (N/A or \"nan\") should not be used as a basis for your decision.  
Record A: [{attribute 1}: {attribute 1 value}, {attribute 2}: {attribute 2 value}, ...]  
Record B: [{attribute 1}: {attribute 1 value}, {attribute 2}: {attribute 2 value}, ...]  
Are record A and record B the same entity?  
After your reasoning, finish your response in a separate line with and ONLY with your final answer. Choose your final answer from [Yes, No].  
```
#### For Data Imputation
```
You are presented with a {keyword} record that is missing a specific attribute {attribute X}.
Your task is to deduce or infer the manufacturer of the product using the available information in the record.
You may be provided with fields like {attribute 1}, {attribute 2}, ... to help you in the inference.
Record: [{attribute 1}: {attribute 1 value}, {attribute 2}: {attribute 2 value}, ...]
Based on the provided product record, what would you infer is the value for the missing attribute {attribute X}?
After your reasoning, finish your response in a separate line with and ONLY with your final answer.
Your final answer should only consist of the value of {attribute X}.
```
#### For Error Detection
```
Your task is to determine if there is an error in the value of a specific attribute within the whole record provided.
Errors may include, but are not limited to, spelling errors, inconsistencies, or values that don't make sense given the context of the whole record.
Record [{attribute 1}: {attribute 1 value}, {attribute 2}: {attribute 2 value}, ...]
Attribute for verification: [{attribute X}: {attribute X value}]
Question: Is there an error in the value of {attribute X}?
After your reasoning, finish your response in a separate line with and ONLY with your final answer. Choose your final answer from [Yes, No].
```
```
Your task is to determine if there is an error in the value of a specific attribute.
The attributes may belong to a {keyword} record.
Errors can include, but are not limited to, spelling errors, inconsistencies, or values that don't make sense for that attribute.  
Note: Missing values (N/A or \"nan\") are not considered errors.
Attribute for Verification: [{attribute X}: {attribute X value}]
Question: Is there an error in the value of {attribute X}?
After your reasoning, finish your response in a separate line with and ONLY with your final answer. Choose your final answer from [Yes, No].",
```
#### For Schema Matching
```
Your task is to determine if the two attributes (columns) are semantically equivalent in the context of merging two tables.
Each attribute will be provided by its name and a brief description.
Your goal is to assess if they refer to the same information based on these names and descriptions provided.
Attribute A is [name: {value of name}, description: {value of description}].
Attribute B is [name: {value of name}, description: {value of description}].
After your reasoning, finish your response in a separate line with and ONLY with your final answer. Choose your final answer from [Yes, No].
```

## Sample Responses from Jellyfish-13B-Reasoning
We've provided a few sample responses from Jellyfish-13B-Reasoning to demonstrate its performance.

_For easier readability, we display the raw data record instead of the entire prompt._

1. ```
   Product A: [name: \"adobe creative suite cs3 web standard [ mac ]\", manufacturer: \"adobe\", price: \"999.0\"]
   Product B: [name: \"adobe creative suite 3 ( cs3 ) web standard 3 windows upsell from dreamweaver or flash\", price: \"799.0\"]
   
   Product A and Product B are not the same. Although both products are Adobe Creative Suite CS3 Web Standard, they are for different operating systems.
   Product A is for Mac and Product B is for Windows. This difference in operating systems indicates that the products are not the same, as they are designed for different hardware and software environments.
   Additionally, Product B mentions that it is an upsell from Dreamweaver or Flash, which further differentiates it from Product A.
   No
   ```
2. ```
   Article A: [title: \"l/mrp : a buffer management strategy for interactive continuous data flows in a multimedia dbms\", authors: \"f moser , a kraiss , w klas\", venue: \"vldb\", year: \"1995\"]
   Article B: [title: \"l/mrp : a buffer management strategy for interactive continuous data flows in a multimedia dbms\", authors: \"f moser , w klas\", venue: \"proceedings of the international conference on very large & hellip ; ,\", year: \"1995.0\"]
   
   The titles of both Article A and Article B are identical, which is a strong indicator that they are the same article.
   The authors of both articles are also the same, with the exception that Article B does not include the author \"a kraiss\". However, this could be due to a mistake in data entry or a missing author in Article B.
   The venue for both articles is also similar, with Article A listed as \"vldb\" and Article B listed as \"proceedings of the international conference on very large & hellip ; ,\" which is likely the same conference.
   The year of publication is also the same for both articles, with Article A listed as \"1995\" and Article B listed as \"1995.0\".
   Given these similarities, it is reasonable to conclude that Article A and Article B are the same.
   Yes
   ```
3. ```
   Record: [name: "le montrachet bistro", addr: "3000 paradise rd.", phone: "702-732-5651", type: "french bistro"].
   missing attribute: "City"

   The restaurant record provides the name, address, phone number, and type of restaurant. The name and type do not provide any specific information about the city. However, the address and phone number can be used to infer the city.
   The address, "3000 paradise rd.", could potentially be in many different cities. However, the phone number, "702-732-5651", provides a clue. The area code, 702, is used in the state of Nevada, specifically in the Las Vegas metropolitan area.
   Therefore, based on the area code of the phone number, it can be inferred that the restaurant is located in Las Vegas.
   Las Vegas
   ```
   

<!--
## Bias, Risks, and Limitations

 This section is meant to convey both technical and sociotechnical limitations. 
As of now, we've tested Jellyfish exclusively with the test sets from the benchmark datasets mentioned earlier. 

We're in the process of assessing its performance on additional datasets.
-->

<!--## Citation


 If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section.

```bibtex
@article{
  title = {Can Foundation Models Wrangle Your Data?},
  author = {Avanika Narayan, Ines Chami, Laurel Orr, Simran Arora, Christopher Ré},
  booktitle = {arXiv:2205.09911},
  year = {2022}  
}

@software{hunterlee2023orcaplaty1
  title = {OpenOrcaPlatypus: Llama2-13B Model Instruct-tuned on Filtered OpenOrcaV1 GPT-4 Dataset and Merged with divergent STEM and Logic Dataset Model},
  author = {Ariel N. Lee and Cole J. Hunter and Nataniel Ruiz and Bleys Goodson and Wing Lian and Guan Wang and Eugene Pentland and Austin Cook and Chanvichet Vong and "Teknium"},
  year = {2023},
  publisher = {HuggingFace},
  journal = {HuggingFace repository},
  howpublished = {\url{https://huggingface.co/Open-Orca/OpenOrca-Platypus2-13B},
}
@article{platypus2023,
    title={Platypus: Quick, Cheap, and Powerful Refinement of LLMs}, 
    author={Ariel N. Lee and Cole J. Hunter and Nataniel Ruiz},
    booktitle={arXiv preprint arxiv:2308.07317},
    year={2023}
}
@software{OpenOrcaxOpenChatPreview2,
  title = {OpenOrcaxOpenChatPreview2: Llama2-13B Model Instruct-tuned on Filtered OpenOrcaV1 GPT-4 Dataset},
  author = {Guan Wang and Bleys Goodson and Wing Lian and Eugene Pentland and Austin Cook and Chanvichet Vong and "Teknium"},
  year = {2023},
  publisher = {HuggingFace},
  journal = {HuggingFace repository},
  howpublished = {\url{https://https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B},
}
@software{openchat,
  title = {{OpenChat: Advancing Open-source Language Models with Imperfect Data}},
  author = {Wang, Guan and Cheng, Sijie and Yu, Qiying and Liu, Changling},
  doi = {10.5281/zenodo.8105775},
  url = {https://github.com/imoneoi/openchat},
  version = {pre-release},
  year = {2023},
  month = {7},
}
@misc{mukherjee2023orca,
      title={Orca: Progressive Learning from Complex Explanation Traces of GPT-4}, 
      author={Subhabrata Mukherjee and Arindam Mitra and Ganesh Jawahar and Sahaj Agarwal and Hamid Palangi and Ahmed Awadallah},
      year={2023},
      eprint={2306.02707},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}
@misc{touvron2023llama,
    title={Llama 2: Open Foundation and Fine-Tuned Chat Models}, 
    author={Hugo Touvron and Louis Martin and Kevin Stone and Peter Albert and Amjad Almahairi and Yasmine Babaei and Nikolay Bashlykov and Soumya Batra and Prajjwal Bhargava and Shruti Bhosale and Dan Bikel and Lukas Blecher and Cristian Canton Ferrer and Moya Chen and Guillem Cucurull and David Esiobu and Jude Fernandes and Jeremy Fu and Wenyin Fu and Brian Fuller and Cynthia Gao and Vedanuj Goswami and Naman Goyal and Anthony Hartshorn and Saghar Hosseini and Rui Hou and Hakan Inan and Marcin Kardas and Viktor Kerkez and Madian Khabsa and Isabel Kloumann and Artem Korenev and Punit Singh Koura and Marie-Anne Lachaux and Thibaut Lavril and Jenya Lee and Diana Liskovich and Yinghai Lu and Yuning Mao and Xavier Martinet and Todor Mihaylov and Pushkar Mishra and Igor Molybog and Yixin Nie and Andrew Poulton and Jeremy Reizenstein and Rashi Rungta and Kalyan Saladi and Alan Schelten and Ruan Silva and Eric Michael Smith and Ranjan Subramanian and Xiaoqing Ellen Tan and Binh Tang and Ross Taylor and Adina Williams and Jian Xiang Kuan and Puxin Xu and Zheng Yan and Iliyan Zarov and Yuchen Zhang and Angela Fan and Melanie Kambadur and Sharan Narang and Aurelien Rodriguez and Robert Stojnic and Sergey Edunov and Thomas Scialom},
    year={2023},
    eprint= arXiv 2307.09288
}
@misc{longpre2023flan,
      title={The Flan Collection: Designing Data and Methods for Effective Instruction Tuning}, 
      author={Shayne Longpre and Le Hou and Tu Vu and Albert Webson and Hyung Won Chung and Yi Tay and Denny Zhou and Quoc V. Le and Barret Zoph and Jason Wei and Adam Roberts},
      year={2023},
      eprint={2301.13688},
      archivePrefix={arXiv},
      primaryClass={cs.AI}
}
@article{hu2021lora,
  title={LoRA: Low-Rank Adaptation of Large Language Models},
  author={Hu, Edward J. and Shen, Yelong and Wallis, Phillip and Allen-Zhu, Zeyuan and Li, Yuanzhi and Wang, Shean and Chen, Weizhu},
  journal={CoRR},
  year={2021}
}
-->


<!--**BibTeX:**

[More Information Needed]

**APA:**

[More Information Needed]

## Glossary [optional]

[More Information Needed]

## More Information [optional]

[More Information Needed]

## Model Card Authors [optional]

[More Information Needed]

## Model Card Contact

[More Information Needed]-->