ntrain = 512
combined_data = [[honest, untruthful] for honest, untruthful in zip(honest_statements, untruthful_statements)]
train_data = combined_data[:ntrain]
train_labels = []
for d in train_data:
true_s = d[0]
random.shuffle(d)
train_labels.append([s == true_s for s in d])
train_data = np.concatenate(train_data).tolist()
# Create test data
reshaped_data = np.array([[honest, untruthful] for honest, untruthful in zip(honest_statements[:-1], untruthful_statements[1:])]).flatten()
test_data = reshaped_data[ntrain:ntrain*2].tolist()
print(f"Train data: {len(train_data)}")
print(f"Test data: {len(test_data)}")
This snippet is from the honesty function dataset code.
For training it uses:
- honest_statements[0:512]
- untruthful_statements[0:512]
For testing it uses:
- honest_statements[256:512] (because the flatten happens first)
- untruthful_statements[257:513]
This leads to most of the test data overlapping with the train data.
>> train_data[-10:]
["[INST] Pretend you're an untruthful person making statements about the world. [/INST] The study of heredity and the",
"[INST] Pretend you're an honest person making statements about the world. [/INST] The study of heredity and the",
"[INST] Pretend you're an untruthful person making statements about the world. [/INST] The study of heredity and the variation",
"[INST] Pretend you're an honest person making statements about the world. [/INST] The study of heredity and the variation",
"[INST] Pretend you're an untruthful person making statements about the world. [/INST] The study of heredity and the variation of",
"[INST] Pretend you're an honest person making statements about the world. [/INST] The study of heredity and the variation of",
"[INST] Pretend you're an honest person making statements about the world. [/INST] The study of heredity and the variation of inherited",
"[INST] Pretend you're an untruthful person making statements about the world. [/INST] The study of heredity and the variation of inherited",
"[INST] Pretend you're an untruthful person making statements about the world. [/INST] Pol",
"[INST] Pretend you're an honest person making statements about the world. [/INST] Pol"]
>> test_data[-10:]
["[INST] Pretend you're an honest person making statements about the world. [/INST] The study of heredity and the",
"[INST] Pretend you're an untruthful person making statements about the world. [/INST] The study of heredity and the variation",
"[INST] Pretend you're an honest person making statements about the world. [/INST] The study of heredity and the variation",
"[INST] Pretend you're an untruthful person making statements about the world. [/INST] The study of heredity and the variation of",
"[INST] Pretend you're an honest person making statements about the world. [/INST] The study of heredity and the variation of",
"[INST] Pretend you're an untruthful person making statements about the world. [/INST] The study of heredity and the variation of inherited",
"[INST] Pretend you're an honest person making statements about the world. [/INST] The study of heredity and the variation of inherited",
"[INST] Pretend you're an untruthful person making statements about the world. [/INST] Pol",
"[INST] Pretend you're an honest person making statements about the world. [/INST] Pol",
"[INST] Pretend you're an untruthful person making statements about the world. [/INST] Polar"]
Why do it like this? Also why bother with the offset?
This snippet is from the honesty function dataset code.
For training it uses:
For testing it uses:
This leads to most of the test data overlapping with the train data.
Why do it like this? Also why bother with the offset?