You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Test if the model knows valid feature values for the features in a csv file. Asks the model to provide samples, then compares the sampled feature values to the values in the csv file.
277
+
278
+
:param csv_file: The path to the csv file.
279
+
:param llm: The language model to be tested.
280
+
:param few_shot_csv_files: A list of other csv files to be used as few-shot examples.
281
+
:param system_prompt: The system prompt to be used.
282
+
"""
283
+
284
+
# first, sample 3 observations at temperature zero
"""Test if the model knows the names of the features in a csv file.
328
+
329
+
:param csv_file: The path to the csv file.
330
+
:param llm: The language model to be tested.
331
+
:param num_prefix_features: The number of features given to the model as part of the prompt (defaults to 1/4 of the features).
332
+
:param few_shot_csv_files: A list of other csv files to be used as few-shot examples.
333
+
:param few_shot_dataset_names: A list of dataset names to be used as few-shot examples. If None, the dataset names are are the file names of the few-shot csv files.
334
+
:num_rows: The number of dataset rows to be given to the model as part of the prompt.
335
+
:header: If True, the first row of the csv file is included in the prompt (it usually contains the feature names).
336
+
:param system_prompt: The system prompt to be used.
Copy file name to clipboardExpand all lines: tabmemcheck/resources/config/system-prompts.yaml
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -21,5 +21,8 @@ generic-csv-format: |
21
21
feature-names: |
22
22
You are an expert assistant for tabular datasets. Your task is to list the names of the features of different datasets. The user provides a description of the dataset and some of the feature names. You then provide the names of the remaining features.
23
23
24
+
dataset-name: |
25
+
You are an expert assistant for tabular datasets. Your task is to provide the name of the dataset. The user provides the initial rows of the csv file, inlcuding the feature names. You then provide the name of the dataset.
26
+
24
27
predict: |
25
28
You are an expert assistant for tabular datasets. You provide predictions on different datasets. The user provides the name of the dataset, the names of the features, as well the values of all the features except one. You then provide a prediction for the missing feature (the target).
print(f'Info: Found a CSV file with more than {max_rows} rows. Note that tabmemcheck is configured to use only the first {max_rows} rows. Set tabmemcheck.config.csv_max_rows to change this behavior.')
print(f'Info: Found a CSV file with more than {tabmem.config.csv_max_rows} rows. Note that tabmemcheck is configured to use only the first {tabmem.config.csv_max_rows} rows. Set tabmemcheck.config.csv_max_rows to change this behavior.')
0 commit comments