cat-llm 0.0.72__tar.gz → 0.0.73__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cat-llm
3
- Version: 0.0.72
3
+ Version: 0.0.73
4
4
  Summary: A tool for categorizing text data and images using LLMs and vision models
5
5
  Project-URL: Documentation, https://github.com/chrissoria/cat-llm#readme
6
6
  Project-URL: Issues, https://github.com/chrissoria/cat-llm/issues
@@ -189,16 +189,22 @@ Performs multi-label classification of text responses into user-defined categori
189
189
  Processes each text response individually, assigning one or more categories from the provided list. Supports flexible output formatting and optional saving of results to CSV for easy integration with data analysis workflows.
190
190
 
191
191
  **Parameters:**
192
- - `survey_question` (str): The survey question being analyzed
193
192
  - `survey_input` (list): List of text responses to classify
194
193
  - `categories` (list): List of predefined categories for classification
195
194
  - `api_key` (str): API key for the LLM service
196
- - `user_model` (str, default="gpt-4o"): Specific model to use
197
- - `creativity` (float, default=0): Temperature/randomness setting (0.0-1.0)
195
+ - `user_model` (str, default="gpt-5"): Specific model to use
196
+ - `user_prompt` (str, optional): Custom prompt template to override default prompting
197
+ - `survey_question` (str, default=""): The survey question being analyzed
198
+ - `example1` through `example6` (dict, optional): Few-shot learning examples (format: {"response": "...", "categories": [...]})
199
+ - `creativity` (float, optional): Temperature/randomness setting (0.0-1.0, varies by model)
198
200
  - `safety` (bool, default=False): Enable safety checks on responses and saves to CSV at each API call step
201
+ - `to_csv` (bool, default=False): Whether to save results to CSV
202
+ - `chain_of_verification` (bool, default=False): Enable Chain-of-Verification prompting technique for improved accuracy
203
+ - `step_back_prompt` (bool, default=False): Enable step-back prompting to analyze higher-level context before classification
204
+ - `context_prompt` (bool, default=False): Add expert role and behavioral guidelines to the prompt
199
205
  - `filename` (str, default="categorized_data.csv"): Filename for CSV output
200
206
  - `save_directory` (str, optional): Directory path to save the CSV file
201
- - `model_source` (str, default="OpenAI"): Model provider ("OpenAI", "Anthropic", "Perplexity", "Mistral")
207
+ - `model_source` (str, default="auto"): Model provider ("auto", "OpenAI", "Anthropic", "Google", "Mistral", "Perplexity", "Huggingface")
202
208
 
203
209
  **Returns:**
204
210
  - `pandas.DataFrame`: DataFrame with classification results, columns formatted as specified
@@ -160,16 +160,22 @@ Performs multi-label classification of text responses into user-defined categori
160
160
  Processes each text response individually, assigning one or more categories from the provided list. Supports flexible output formatting and optional saving of results to CSV for easy integration with data analysis workflows.
161
161
 
162
162
  **Parameters:**
163
- - `survey_question` (str): The survey question being analyzed
164
163
  - `survey_input` (list): List of text responses to classify
165
164
  - `categories` (list): List of predefined categories for classification
166
165
  - `api_key` (str): API key for the LLM service
167
- - `user_model` (str, default="gpt-4o"): Specific model to use
168
- - `creativity` (float, default=0): Temperature/randomness setting (0.0-1.0)
166
+ - `user_model` (str, default="gpt-5"): Specific model to use
167
+ - `user_prompt` (str, optional): Custom prompt template to override default prompting
168
+ - `survey_question` (str, default=""): The survey question being analyzed
169
+ - `example1` through `example6` (dict, optional): Few-shot learning examples (format: {"response": "...", "categories": [...]})
170
+ - `creativity` (float, optional): Temperature/randomness setting (0.0-1.0, varies by model)
169
171
  - `safety` (bool, default=False): Enable safety checks on responses and saves to CSV at each API call step
172
+ - `to_csv` (bool, default=False): Whether to save results to CSV
173
+ - `chain_of_verification` (bool, default=False): Enable Chain-of-Verification prompting technique for improved accuracy
174
+ - `step_back_prompt` (bool, default=False): Enable step-back prompting to analyze higher-level context before classification
175
+ - `context_prompt` (bool, default=False): Add expert role and behavioral guidelines to the prompt
170
176
  - `filename` (str, default="categorized_data.csv"): Filename for CSV output
171
177
  - `save_directory` (str, optional): Directory path to save the CSV file
172
- - `model_source` (str, default="OpenAI"): Model provider ("OpenAI", "Anthropic", "Perplexity", "Mistral")
178
+ - `model_source` (str, default="auto"): Model provider ("auto", "OpenAI", "Anthropic", "Google", "Mistral", "Perplexity", "Huggingface")
173
179
 
174
180
  **Returns:**
175
181
  - `pandas.DataFrame`: DataFrame with classification results, columns formatted as specified
@@ -1,7 +1,7 @@
1
1
  # SPDX-FileCopyrightText: 2025-present Christopher Soria <chrissoria@berkeley.edu>
2
2
  #
3
3
  # SPDX-License-Identifier: MIT
4
- __version__ = "0.0.72"
4
+ __version__ = "0.0.73"
5
5
  __author__ = "Chris Soria"
6
6
  __email__ = "chrissoria@berkeley.edu"
7
7
  __title__ = "cat-llm"
@@ -410,7 +410,6 @@ def multi_class(
410
410
  When uncertain, prioritize precision over recall."""
411
411
 
412
412
  prompt = context + prompt
413
- print(prompt)
414
413
 
415
414
  if chain_of_verification:
416
415
  step2_prompt = f"""You provided this initial categorization:
File without changes
File without changes
File without changes