Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SalesforceAIResearch/promptomatix
/ functions
Functions
248 in github.com/SalesforceAIResearch/promptomatix
⨍
Functions
248
◇
Types & classes
22
↓ 1 callers
Function
generate_sample_data_from_sample_data
(task: str, complete_sample: str)
src/promptomatix/core/prompts.py:1037
↓ 1 callers
Function
generate_sample_data_from_task_description_and_raw_input
(task_description: str, human_input: str)
src/promptomatix/core/prompts.py:1346
↓ 1 callers
Function
generate_synthetic_data_prompt
(task: str, batch_size: int, example_data: str, template: str, feedback_section: str)
src/promptomatix/core/prompts.py:53
↓ 1 callers
Function
generate_task_description_from_sample_data
(sample_data: str)
src/promptomatix/core/prompts.py:576
↓ 1 callers
Function
get_ai_output
(prompt)
src/promptomatix/main.py:663
↓ 1 callers
Method
get_all_feedback
Get all feedback in dictionary format.
src/promptomatix/core/feedback.py:58
↓ 1 callers
Function
get_comprehensive_feedback
(prompt)
src/promptomatix/main.py:751
↓ 1 callers
Method
get_eval_metrics
Get evaluation metrics for the task type.
src/promptomatix/core/optimizer.py:751
↓ 1 callers
Function
get_expected_answer_from_sample_data
(task_description: str, sample_data: str)
src/promptomatix/core/prompts.py:957
↓ 1 callers
Method
get_metrics_for_task
Returns appropriate evaluation metric function based on task type. Args: task_type (str): Type of the task
src/promptomatix/metrics/metrics.py:77
↓ 1 callers
Function
get_openai_feedback
(prompt)
src/promptomatix/main.py:689
↓ 1 callers
Function
improvise_raw_input_task
(human_input: str)
src/promptomatix/core/prompts.py:220
↓ 1 callers
Function
improvise_raw_input_tools
(available_functions_text: str)
src/promptomatix/core/prompts.py:158
↓ 1 callers
Method
list_sessions
List all active sessions.
src/promptomatix/core/session.py:204
↓ 1 callers
Function
load_sample_prompts
Load sample prompts for demonstration.
examples/scripts/batch_processing.py:221
↓ 1 callers
Method
load_session_from_file
Load a specific session from a file path.
src/promptomatix/core/session.py:120
↓ 1 callers
Function
main
()
setup.py:41
↓ 1 callers
Function
main
Main entry point for the CLI application.
src/promptomatix/main.py:928
↓ 1 callers
Function
main
Main CLI entry point.
src/promptomatix/cli/parser.py:93
↓ 1 callers
Function
main
Main function demonstrating basic Promptomatix usage.
examples/scripts/basic_example.py:24
↓ 1 callers
Function
main
Main function for batch processing demonstration.
examples/scripts/batch_processing.py:258
↓ 1 callers
Function
main
Main function for custom metrics demonstration.
examples/scripts/custom_metrics.py:270
↓ 1 callers
Function
optimize_with_feedback
Optimize prompt based on feedback for a given session. Args: session_id (str): Session identifier Returns:
src/promptomatix/main.py:148
↓ 1 callers
Method
process_sequential
Process prompts sequentially.
examples/scripts/batch_processing.py:47
↓ 1 callers
Function
run_optimization_with_metrics
Run optimization and calculate custom metrics.
examples/scripts/custom_metrics.py:255
↓ 1 callers
Method
set_value
Set the lambda penalty value.
src/promptomatix/core/config.py:55
↓ 1 callers
Function
setup_config_logger
Set up dedicated logger for LLM interactions in configuration. Creates a file handler that logs all LLM prompts and responses to a dedicated
src/promptomatix/core/config.py:114
↓ 1 callers
Function
setup_optimizer_logger
Set up dedicated logger for optimization steps and results.
src/promptomatix/core/optimizer.py:804
↓ 1 callers
Function
simplify_human_feedback_2
(human_input: str)
src/promptomatix/core/prompts.py:357
↓ 1 callers
Function
suppress_stderr
Context manager to suppress stderr output.
src/promptomatix/metrics/metrics.py:28
↓ 1 callers
Function
validate_synthetic_data
Validate synthetic data against the task description using LLM. Args: task (str): Task description or requirements data
src/promptomatix/core/prompts.py:2079
Method
__contains__
(self, session_id)
src/promptomatix/main.py:52
Method
__getattr__
(self, name)
src/promptomatix/main.py:831
Method
__getitem__
(self, session_id)
src/promptomatix/main.py:45
Method
__init__
(self, session_id: str)
src/promptomatix/logger.py:7
Method
__init__
(self, session_manager)
src/promptomatix/main.py:42
Method
__init__
Initialize a new session logger. Args: session_id (str): Unique identifier for the session
src/promptomatix/utils/logging.py:23
Method
__init__
Initialize configuration parameters for DSPy task. Args: **kwargs: Configuration parameters as described in class attribu
src/promptomatix/core/config.py:263
Method
__init__
Initialize the optimizer with configuration. Args: config (Config): Configuration object containing optimization
src/promptomatix/core/optimizer.py:46
Method
__init__
Initialize a new optimization session. Args: session_id (str): Unique identifier for the session ini
src/promptomatix/core/session.py:32
Method
__init__
(self)
src/promptomatix/core/session.py:115
Method
__init__
(self, text: str, start_offset: int, end_offset: int, feedback: str, prompt_id: Optional[str
src/promptomatix/core/feedback.py:23
Method
__init__
(self)
src/promptomatix/core/feedback.py:50
Method
__init__
(self, api_key: str, max_workers: int = 3)
examples/scripts/batch_processing.py:33
Method
__init__
(self)
examples/scripts/custom_metrics.py:32
Method
__setitem__
(self, session_id, session)
src/promptomatix/main.py:48
Method
_classification_metrics
Compute metrics for Classification tasks. Returns accuracy (1 for correct, 0 for incorrect). Returns: float: Scor
src/promptomatix/metrics/metrics.py:209
Method
_classification_metrics_final_eval
Compute metrics for Classification tasks. Returns accuracy (1 for correct, 0 for incorrect). Returns: float: Scor
src/promptomatix/metrics/metrics.py:479
Method
_code_completion_metrics
Compute metrics for code completion tasks. Evaluates completion correctness and consistency with context. Returns:
src/promptomatix/metrics/metrics.py:847
Method
_code_completion_metrics_final_eval
Final evaluation metrics for code completion tasks.
src/promptomatix/metrics/metrics.py:1303
Method
_code_debugging_metrics
Compute metrics for code debugging tasks. Evaluates bug identification and fix correctness. Returns: float: Score
src/promptomatix/metrics/metrics.py:880
Method
_code_debugging_metrics_final_eval
Final evaluation metrics for code debugging tasks.
src/promptomatix/metrics/metrics.py:1324
Method
_code_explanation_metrics
Compute metrics for code explanation tasks. Evaluates explanation clarity, completeness, and accuracy. Returns: f
src/promptomatix/metrics/metrics.py:814
Method
_code_explanation_metrics_final_eval
Final evaluation metrics for code explanation tasks.
src/promptomatix/metrics/metrics.py:1282
Method
_code_generation_metrics
Compute metrics for code generation tasks. Evaluates code correctness, style, and efficiency. Returns: float: Sco
src/promptomatix/metrics/metrics.py:781
Method
_code_generation_metrics_final_eval
Final evaluation metrics for code generation tasks.
src/promptomatix/metrics/metrics.py:1261
Method
_conversation_metrics
Compute metrics for conversation tasks. Evaluates response relevance, coherence, and context preservation. Returns:
src/promptomatix/metrics/metrics.py:715
Method
_conversation_metrics_final_eval
Final evaluation metrics for conversation tasks.
src/promptomatix/metrics/metrics.py:1219
Method
_data_analysis_metrics
Compute metrics for data analysis tasks. Evaluates analysis accuracy and insight quality. Returns: float: Score b
src/promptomatix/metrics/metrics.py:1111
Method
_data_analysis_metrics_final_eval
Final evaluation metrics for data analysis tasks.
src/promptomatix/metrics/metrics.py:1471
Method
_decision_making_metrics
Compute metrics for decision making tasks. Evaluates decision quality and reasoning. Returns: float: Score betwee
src/promptomatix/metrics/metrics.py:979
Method
_decision_making_metrics_final_eval
Final evaluation metrics for decision making tasks.
src/promptomatix/metrics/metrics.py:1387
Method
_default_metrics
Default metrics when task type is unknown. Returns exact match score. Returns: float: Score between 0 and 1
src/promptomatix/metrics/metrics.py:346
Method
_default_metrics_final_eval
Default metrics when task type is unknown. Returns exact match score. Returns: float: Score between 0 and 1
src/promptomatix/metrics/metrics.py:588
Method
_final_eval_metrics
Final evaluation metrics.
src/promptomatix/metrics/metrics.py:369
Method
_generation_metrics
Compute metrics for Text Generation tasks. Returns average of BLEU and ROUGE scores. Returns: float: Score betwee
src/promptomatix/metrics/metrics.py:230
Method
_generation_metrics_final_eval
Compute metrics for Text Generation tasks. Returns average of BLEU and ROUGE scores. Returns: float: Score betwee
src/promptomatix/metrics/metrics.py:493
Method
_improvise_raw_input
Improvise the human input.
src/promptomatix/core/config.py:520
Method
_information_extraction_metrics
Compute metrics for information extraction tasks. Uses F1 score for extracted entities/relations and structure accuracy. Retu
src/promptomatix/metrics/metrics.py:643
Method
_information_extraction_metrics_final_eval
Final evaluation metrics for information extraction tasks.
src/promptomatix/metrics/metrics.py:1171
Method
_multi_label_classification_metrics
Compute metrics for multi-label classification tasks. Uses label-based F1 score and Hamming distance. Returns: fl
src/promptomatix/metrics/metrics.py:604
Method
_multi_label_classification_metrics_final_eval
Final evaluation metrics for multi-label classification tasks.
src/promptomatix/metrics/metrics.py:1144
Method
_negotiation_metrics
Compute metrics for negotiation tasks. Evaluates goal achievement, fairness, and strategy effectiveness. Returns:
src/promptomatix/metrics/metrics.py:748
Method
_negotiation_metrics_final_eval
Final evaluation metrics for negotiation tasks.
src/promptomatix/metrics/metrics.py:1240
Method
_paraphrasing_metrics
Compute metrics for paraphrasing tasks. Combines semantic similarity with diversity from original text. Returns:
src/promptomatix/metrics/metrics.py:681
Method
_paraphrasing_metrics_final_eval
Final evaluation metrics for paraphrasing tasks.
src/promptomatix/metrics/metrics.py:1197
Method
_planning_metrics
Compute metrics for planning tasks. Evaluates plan completeness, feasibility, and structure. Returns: float: Scor
src/promptomatix/metrics/metrics.py:913
Method
_planning_metrics_final_eval
Final evaluation metrics for planning tasks.
src/promptomatix/metrics/metrics.py:1345
Method
_process_automation_metrics
Compute metrics for process automation tasks. Evaluates workflow efficiency and completeness. Returns: float: Sco
src/promptomatix/metrics/metrics.py:1012
Method
_process_automation_metrics_final_eval
Final evaluation metrics for process automation tasks.
src/promptomatix/metrics/metrics.py:1408
Method
_qa_metrics
Evaluates QA predictions using BERT Score. Args: example: The example containing the gold answer pre
src/promptomatix/metrics/metrics.py:162
Method
_qa_metrics_final_eval
Evaluates QA predictions using BERT Score. Args: example: The example containing the gold answer pre
src/promptomatix/metrics/metrics.py:440
Method
_reasoning_metrics
Compute metrics for reasoning tasks. Evaluates logical consistency and step-by-step explanation. Returns: float:
src/promptomatix/metrics/metrics.py:1045
Method
_reasoning_metrics_final_eval
Final evaluation metrics for reasoning tasks.
src/promptomatix/metrics/metrics.py:1429
Method
_recommendation_metrics
Compute metrics for recommendation tasks. Evaluates recommendation relevance and personalization. Returns: float:
src/promptomatix/metrics/metrics.py:1078
Method
_recommendation_metrics_final_eval
Final evaluation metrics for recommendation tasks.
src/promptomatix/metrics/metrics.py:1450
Method
_summarization_metrics
Compute metrics for Summarization tasks. Returns average of ROUGE-1, ROUGE-2, and ROUGE-L F1 scores. Returns: flo
src/promptomatix/metrics/metrics.py:259
Method
_summarization_metrics_final_eval
Compute metrics for Summarization tasks. Returns average of ROUGE-1, ROUGE-2, and ROUGE-L F1 scores. Returns: flo
src/promptomatix/metrics/metrics.py:515
Method
_tool_use_metrics
Compute metrics for tool use tasks. Evaluates appropriate tool selection and usage. Returns: float: Score between
src/promptomatix/metrics/metrics.py:946
Method
_tool_use_metrics_final_eval
Final evaluation metrics for tool use tasks.
src/promptomatix/metrics/metrics.py:1366
Method
_translation_metrics
Evaluates translation predictions using BERT Score with automatic language detection.
src/promptomatix/metrics/metrics.py:292
Method
_translation_metrics_final_eval
Evaluates translation predictions using BERT Score with automatic language detection.
src/promptomatix/metrics/metrics.py:541
Method
_validate
Validate all configuration parameters after population. This validation ensures that all required fields are present and correctly ty
src/promptomatix/core/config.py:729
Method
add_feedback
Add a new feedback to the session.
src/promptomatix/core/session.py:64
Method
analyze_feedback
Analyze feedback and provide insights.
src/promptomatix/core/feedback.py:67
Function
bert_score_silent
BERTScore wrapper that suppresses all stderr output.
src/promptomatix/metrics/metrics.py:42
Function
complete_sample_data
(task_description: str, task: str, response: str)
src/promptomatix/core/prompts.py:1435
Function
complete_the_main_example_simple
(task_description: str, task: str, question: str = "", context: str = "")
src/promptomatix/core/prompts.py:942
Method
configure_dspy
Configure DSPy with the given language model
src/promptomatix/lm_manager.py:72
Method
dataset_slice_to_dict_list
Convert dataset slice to list of dictionaries.
src/promptomatix/core/config.py:1669
← previous
next →
101–200 of 248, ranked by callers