DSPy: The framework for programming—not prompting—language models
1783 matches across 19 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | dspy/propose/dataset_summary_generator.py | 30 | def order_input_keys_in_string(unordered_repr): |
| LOW | dspy/propose/propose_base.py | 9 | def propose_instructions_for_program(self): |
| LOW | dspy/propose/propose_base.py | 12 | def propose_instruction_for_predictor(self): |
| LOW | dspy/propose/utils.py | 22 | def create_instruction_set_history_string(base_program, trial_logs, top_n): |
| LOW | dspy/propose/utils.py | 58 | def parse_list_of_instructions(instruction_string): |
| LOW | dspy/propose/utils.py | 70 | def get_program_instruction_set_string(program): |
| LOW | dspy/propose/utils.py | 78 | def create_predictor_level_history_string(base_program, predictor_i, trial_logs, top_n): |
| LOW | dspy/propose/grounded_proposer.py | 64 | def generate_instruction_class( |
| LOW | dspy/propose/grounded_proposer.py | 155 | def gather_examples_from_sets(candidate_sets, max_examples): |
| LOW | dspy/propose/grounded_proposer.py | 306 | def propose_instructions_for_program( |
| LOW | dspy/propose/grounded_proposer.py | 366 | def propose_instruction_for_predictor( |
| LOW | dspy/clients/base_lm.py | 70 | def supports_function_calling(self) -> bool: |
| LOW | dspy/clients/base_lm.py | 147 | def _declares_forward_contract(self) -> bool: |
| LOW | dspy/clients/base_lm.py | 167 | def _validate_typed_lm_response(self, response: Any) -> LMResponse: |
| LOW | dspy/clients/base_lm.py | 176 | def _validate_legacy_lm_response( |
| LOW | dspy/clients/base_lm.py | 206 | def supports_function_calling(self) -> bool: |
| LOW | dspy/clients/base_lm.py | 505 | def _extract_citations_from_response(self, choice): |
| LOW | dspy/clients/embedding.py | 169 | def _cached_compute_embeddings(model, batch_inputs, caching=True, **kwargs): |
| LOW | dspy/clients/embedding.py | 185 | async def _cached_acompute_embeddings(model, batch_inputs, caching=True, **kwargs): |
| LOW | dspy/clients/__init__.py | 87 | def configure_litellm_logging(level: str = "ERROR"): |
| LOW | dspy/clients/utils_finetune.py | 131 | def find_data_errors_completion(data_dict: dict[str, str]) -> str | None: |
| LOW | dspy/clients/utils_finetune.py | 164 | def find_data_error_chat_message(message: dict[str, Any]) -> str | None: |
| LOW | dspy/clients/openai.py | 123 | def is_terminal_training_status(status: TrainingStatus) -> bool: |
| LOW | dspy/clients/_litellm.py | 12 | def _configure_litellm_defaults(litellm: types.ModuleType) -> None: |
| LOW | dspy/clients/_litellm.py | 38 | def is_litellm_context_window_error(error: Exception) -> bool: |
| LOW | dspy/clients/lm.py | 47 | def _is_openai_reasoning_model(model: str) -> bool: |
| LOW | dspy/clients/lm.py | 148 | def supports_function_calling(self) -> bool: |
| LOW | dspy/clients/lm.py | 172 | def _get_cached_completion_fn(self, completion_fn, cache): |
| LOW | dspy/clients/lm.py | 447 | def _get_stream_completion_fn( |
| LOW | dspy/clients/lm.py | 588 | def litellm_responses_completion(request: dict[str, Any], num_retries: int, cache: dict[str, Any] | None = None): |
| LOW | dspy/clients/lm.py | 604 | async def alitellm_responses_completion(request: dict[str, Any], num_retries: int, cache: dict[str, Any] | None = None): |
| LOW | dspy/clients/lm.py | 620 | def _convert_chat_request_to_responses_request(request: dict[str, Any]): |
| LOW | dspy/clients/lm.py | 660 | def _convert_content_item_to_responses_format(item: dict[str, Any]) -> dict[str, Any]: |
| LOW | dspy/clients/lm.py | 700 | def _add_dspy_identifier_to_headers(headers: dict[str, Any] | None = None): |
| LOW | dspy/clients/lm.py | 711 | def _safe_litellm_exception_class(name: str) -> type[Exception] | None: |
| LOW | dspy/clients/lm.py | 716 | def _lm_error_class_from_litellm_exception(exc: Exception) -> type[LMError] | None: |
| LOW | dspy/clients/lm.py | 751 | def _lm_error_class_from_status(status: int | None) -> type[LMError]: |
| LOW | dspy/clients/databricks.py | 273 | def _create_directory_in_databricks_unity_catalog(w: "WorkspaceClient", databricks_unity_catalog_path: str): |
| LOW | dspy/clients/databricks.py | 346 | def _validate_completion_data(data: dict[str, Any]): |
| LOW | dspy/clients/openai_format.py | 123 | def to_openai_responses_request(request: LMRequest) -> dict[str, Any]: |
| LOW | dspy/clients/openai_format.py | 163 | def parts_to_responses_content(parts: list[Any]) -> list[dict[str, Any]]: |
| LOW | dspy/clients/openai_format.py | 170 | def tool_call_to_responses_input(tool_call_part: LMToolCallPart) -> dict[str, Any]: |
| LOW | dspy/clients/openai_format.py | 180 | def content_block_to_responses(block: dict[str, Any]) -> dict[str, Any]: |
| LOW | dspy/clients/openai_format.py | 536 | def completion_to_lm_response(response: Any, request: LMRequest) -> LMResponse: |
| LOW | dspy/clients/openai_format.py | 645 | def provider_tool_call_to_part(tool_call: Any) -> LMToolCallPart: |
| LOW | dspy/clients/openai_format.py | 661 | def responses_function_call_to_part(output_item: Any) -> LMToolCallPart: |
| LOW | dspy/clients/openai_format.py | 689 | def extract_citations_from_choice(choice: Any) -> list[LMCitationPart]: |
| LOW | dspy/clients/openai_format.py | 704 | def responses_annotations_to_citations(content_item: Any) -> list[LMCitationPart]: |
| LOW | dspy/clients/openai_format.py | 898 | def lm_response_from_legacy_outputs(outputs: list[dict[str, Any] | str | None], request: LMRequest) -> LMResponse: |
| LOW | dspy/clients/openai_format.py | 905 | def legacy_outputs_from_lm_response(response: LMResponse) -> list[dict[str, Any] | str | None]: |
| LOW | dspy/clients/openai_format.py | 138 | def message_to_responses_input_items(message: LMMessage) -> list[dict[str, Any]]: |
| LOW | dspy/clients/openai_format.py | 300 | def document_to_openai_blocks(document: LMDocumentPart) -> list[dict[str, Any]]: |
| LOW | dspy/clients/openai_format.py | 369 | def assistant_tool_call_to_openai(call: LMToolCallPart) -> dict[str, Any]: |
| LOW | dspy/clients/openai_format.py | 456 | def reasoning_to_responses_kwargs(reasoning: Any) -> dict[str, Any]: |
| LOW | dspy/clients/openai_format.py | 465 | def _validate_openai_reasoning_temperature(config: LMConfig, *, model: str | None, endpoint: str) -> None: |
| LOW | dspy/clients/openai_format.py | 488 | def _uses_max_completion_tokens(model: str | None) -> bool: |
| LOW | dspy/clients/openai_format.py | 492 | def _is_openai_reasoning_model(model: str | None) -> bool: |
| LOW | dspy/clients/openai_format.py | 510 | def response_format_to_responses(value: Any) -> Any: |
| LOW | dspy/clients/openai_format.py | 516 | def responses_tool_output_text(content: Any) -> str: |
| LOW | dspy/clients/openai_format.py | 627 | def response_content_item_to_parts(item: Any) -> list[Any]: |
| 984 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | dspy/clients/base_lm.py | 356 | Reconstruct an LM from `dump_state` output. Legacy states without a class marker load as `dspy.LM`. Custom LM |
| HIGH | dspy/clients/provider.py | 13 | A future representing an asynchronous model fine-tuning job. This class extends `concurrent.futures.Future` to repr |
| HIGH | dspy/clients/provider.py | 82 | A job for reinforcement learning-based fine-tuning. This class represents a reinforcement learning fine-tuning job |
| HIGH | dspy/retrievers/embeddings.py | 151 | Load the embeddings index from disk into the current instance. Args: path: Directory path |
| HIGH | dspy/retrievers/embeddings.py | 211 | Create an Embeddings instance from a saved index. This is the recommended way to load saved embeddings |
| HIGH | dspy/core/types.py | 1286 | Create a system message for a direct LM call. A system message gives model-level instructions, such as tone, scope, |
| HIGH | dspy/core/types.py | 1324 | Create a developer message for a direct LM call. A developer message carries instructions that sit between system g |
| HIGH | dspy/core/types.py | 1363 | Create a user message for a direct LM call. A user message contains the request or data you want the model to answe |
| HIGH | dspy/core/types.py | 1443 | Create an assistant message for a direct LM call. An assistant message represents a previous model response. Use it |
| HIGH | dspy/core/types.py | 1498 | Create a tool-result message for a direct LM call. A tool-result message sends the output of a tool back to the mod |
| HIGH | dspy/signatures/signature.py | 279 | Return a new Signature class with identical fields and new instructions. This method does not mutate `cls`. It |
| HIGH | dspy/signatures/signature.py | 334 | Insert a field at index 0 of the `inputs` or `outputs` section. Args: name (str): Field name to add |
| HIGH | dspy/signatures/signature.py | 361 | Insert a field at the end of the `inputs` or `outputs` section. Args: name (str): Field name to add |
| HIGH | dspy/signatures/signature.py | 388 | Return a new Signature class without the given field. If `name` is not present, the fields are unchanged (no er |
| HIGH | dspy/signatures/signature.py | 423 | Insert a field at a specific position among inputs or outputs. Negative indices are supported (e.g., `-1` appen |
| HIGH | dspy/signatures/signature.py | 535 | Create a new Signature subclass with the specified fields and instructions. Args: signature: Either a strin |
| HIGH | dspy/signatures/signature.py | 657 | Recursively parse an AST node representing a type annotation. This function converts Python's Abstract Syntax Tree |
| HIGH | dspy/streaming/streamify.py | 39 | Wrap a DSPy program so that it streams its outputs incrementally, rather than returning them all at once. It al |
| HIGH | dspy/primitives/code_interpreter.py | 116 | Execute Python code and return the result. Args: code: Python code to execute variables |
| HIGH | dspy/primitives/example.py | 224 | Mark which fields are inputs and return a new `Example`. Fields not listed here are treated as labels (expected |
| HIGH | dspy/primitives/module.py | 41 | Base class for all DSPy modules (programs). A Module is a building block for DSPy programs that can contain predict |
| HIGH | dspy/primitives/module.py | 226 | Apply a function to all named predictors in this module. This method iterates through all Predict instances in |
| HIGH | dspy/primitives/module.py | 280 | Processes a list of dspy.Example instances in parallel using the Parallel module. Args: ex |
| HIGH | dspy/adapters/types/citation.py | 92 | Convert a list of dictionaries to a Citations instance. Args: citations_dicts: A list of dictionari |
| HIGH | dspy/adapters/types/tool.py | 220 | Build a DSPy tool from a LangChain tool. Args: tool: The LangChain tool to convert. |
| HIGH | dspy/adapters/types/tool.py | 285 | Execute this individual tool call and return its result. Args: functions: Functions to sear |
| HIGH | dspy/adapters/types/tool.py | 346 | Convert a list of dictionaries to a ToolCalls instance. Args: dict_list: A list of dictionaries, wh |
| HIGH | dspy/adapters/types/image.py | 129 | Encode an image or file to a base64 data URI. Args: image: The image or file to encode. Can be a PIL I |
| HIGH | dspy/evaluate/metrics.py | 12 | Compute the Exact Match (EM) metric between a prediction and reference answers. Returns True if any reference exact |
| HIGH | dspy/evaluate/metrics.py | 40 | Compute the maximum token-level F1 score against reference answers. Strings are normalized (same as in `EM`) and wh |
| HIGH | dspy/evaluate/metrics.py | 64 | Compute the maximum HotPotQA-style F1 score against reference answers. Like `F1`, but if either normalized side is |
| HIGH | dspy/evaluate/metrics.py | 88 | Normalize text for string and token comparisons. Steps: 1) Unicode NFD normalization 2) lowercasing |
| HIGH | dspy/evaluate/metrics.py | 127 | Compute boolean exact match after normalization. Args: prediction (str): Predicted answer. ground_t |
| HIGH | dspy/evaluate/metrics.py | 145 | Compute token-level F1 between prediction and reference (after normalization). Strings are normalized (see `normali |
| HIGH | dspy/evaluate/metrics.py | 184 | Compute HotPotQA-style token F1 with special labels. If either normalized string is in {"yes", "no", "noanswer"} an |
| HIGH | dspy/evaluate/metrics.py | 222 | Compute token-level precision of prediction against reference (after normalization). Precision is (# overlapping to |
| HIGH | dspy/evaluate/metrics.py | 286 | Evaluate exact match or F1-thresholded match for an example/prediction pair. If `example.answer` is a string, compa |
| HIGH | dspy/evaluate/metrics.py | 321 | Return True if any passage in `pred.context` contains the answer(s). Strings are normalized (and passages also use |
| HIGH | dspy/evaluate/evaluate.py | 129 | Args: program (dspy.Module): The DSPy program to evaluate. metric (Callable): The metri |
| HIGH | dspy/predict/rlm.py | 625 | Execute RLM to produce outputs from the given inputs. Args: **input_args: Input values matching the |
| HIGH | dspy/predict/rlm.py | 710 | Async version of forward(). Execute RLM to produce outputs. Args: **input_args: Input values matchi |
| HIGH | dspy/predict/refine.py | 50 | Refines a module by running it up to N times with different rollout IDs at `temperature=1.0` and return |
| HIGH | dspy/predict/best_of_n.py | 16 | Runs a module up to `N` times with different rollout IDs at `temperature=1.0` and returns the best pred |
| HIGH | dspy/teleprompt/bettertogether.py | 211 | Compile and optimize a student program using a sequence of optimization strategies. Executes the optimizers spe |
| HIGH | dspy/teleprompt/gepa/gepa.py | 196 | ... ``` GEPA can also be used as a batch inference-time search strategy, by passing `valset=trainset, |
| HIGH | tests/mock_interpreter.py | 75 | Execute code and return the next scripted response. Args: code: The code that would be executed (re |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | dspy/__init__.py | 1 | |
| LOW | dspy/__init__.py | 2 | |
| LOW | dspy/__init__.py | 3 | |
| LOW | dspy/__init__.py | 4 | |
| LOW | dspy/__init__.py | 5 | |
| LOW | dspy/__init__.py | 7 | |
| LOW | dspy/__init__.py | 8 | |
| LOW | dspy/__init__.py | 9 | |
| LOW | dspy/__init__.py | 9 | |
| LOW | dspy/__init__.py | 9 | |
| LOW | dspy/__init__.py | 9 | |
| LOW | dspy/__init__.py | 9 | |
| LOW | dspy/__init__.py | 9 | |
| LOW | dspy/__init__.py | 9 | |
| LOW | dspy/__init__.py | 9 | |
| LOW | dspy/__init__.py | 9 | |
| LOW | dspy/__init__.py | 9 | |
| LOW | dspy/__init__.py | 9 | |
| LOW | dspy/__init__.py | 9 | |
| LOW | dspy/__init__.py | 9 | |
| LOW | dspy/__init__.py | 9 | |
| LOW | dspy/__init__.py | 9 | |
| LOW | dspy/__init__.py | 10 | |
| LOW | dspy/__init__.py | 10 | |
| LOW | dspy/__init__.py | 10 | |
| LOW | dspy/__init__.py | 10 | |
| LOW | dspy/__init__.py | 10 | |
| LOW | dspy/__init__.py | 10 | |
| LOW | dspy/__init__.py | 10 | |
| LOW | dspy/__init__.py | 10 | |
| LOW | dspy/__init__.py | 10 | |
| LOW | dspy/__init__.py | 10 | |
| LOW | dspy/__init__.py | 22 | |
| LOW | dspy/__init__.py | 23 | |
| LOW | dspy/__init__.py | 23 | |
| LOW | dspy/__init__.py | 23 | |
| LOW | dspy/__init__.py | 23 | |
| LOW | dspy/__init__.py | 23 | |
| LOW | dspy/__init__.py | 23 | |
| LOW | dspy/__init__.py | 23 | |
| LOW | dspy/__init__.py | 23 | |
| LOW | dspy/__init__.py | 23 | |
| LOW | dspy/__init__.py | 23 | |
| LOW | dspy/__init__.py | 23 | |
| LOW | dspy/__init__.py | 23 | |
| LOW | dspy/__init__.py | 23 | |
| LOW | dspy/__init__.py | 23 | |
| LOW | dspy/__init__.py | 23 | |
| LOW | dspy/__init__.py | 23 | |
| LOW | dspy/__init__.py | 23 | |
| LOW | dspy/__init__.py | 23 | |
| LOW | dspy/__init__.py | 43 | |
| LOW | dspy/__init__.py | 43 | |
| LOW | dspy/__init__.py | 44 | |
| LOW | dspy/__init__.py | 45 | |
| LOW | dspy/__init__.py | 47 | |
| LOW | dspy/__init__.py | 48 | |
| LOW | dspy/__init__.py | 51 | |
| LOW | dspy/__init__.py | 53 | |
| LOW | dspy/__init__.py | 53 | |
| 189 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | dspy/clients/openai_format.py | 114 | # --------------------------------------------------------------------------- |
| MEDIUM | dspy/clients/openai_format.py | 120 | # --------------------------------------------------------------------------- |
| MEDIUM | dspy/clients/openai_format.py | 527 | # --------------------------------------------------------------------------- |
| MEDIUM | dspy/clients/openai_format.py | 533 | # --------------------------------------------------------------------------- |
| MEDIUM | dspy/clients/openai_format.py | 798 | # --------------------------------------------------------------------------- |
| MEDIUM | dspy/clients/openai_format.py | 800 | # --------------------------------------------------------------------------- |
| MEDIUM | dspy/clients/openai_format.py | 888 | # --------------------------------------------------------------------------- |
| MEDIUM | dspy/clients/openai_format.py | 895 | # --------------------------------------------------------------------------- |
| MEDIUM | dspy/clients/openai_format.py | 66 | # --------------------------------------------------------------------------- |
| MEDIUM | dspy/clients/openai_format.py | 73 | # --------------------------------------------------------------------------- |
| MEDIUM | dspy/clients/openai_format.py | 203 | # --------------------------------------------------------------------------- |
| MEDIUM | dspy/clients/openai_format.py | 208 | # --------------------------------------------------------------------------- |
| MEDIUM | dspy/clients/openai_format.py | 231 | # --------------------------------------------------------------------------- |
| MEDIUM | dspy/clients/openai_format.py | 237 | # --------------------------------------------------------------------------- |
| MEDIUM | dspy/primitives/python_interpreter.py | 31 | # ============================================================================= |
| MEDIUM | dspy/primitives/python_interpreter.py | 33 | # ============================================================================= |
| MEDIUM | dspy/predict/rlm.py | 168 | # ========================================================================= |
| MEDIUM | dspy/predict/rlm.py | 170 | # ========================================================================= |
| MEDIUM | dspy/predict/rlm.py | 285 | # ========================================================================= |
| MEDIUM | dspy/predict/rlm.py | 287 | # ========================================================================= |
| MEDIUM | dspy/predict/rlm.py | 339 | # ========================================================================= |
| MEDIUM | dspy/predict/rlm.py | 341 | # ========================================================================= |
| MEDIUM | dspy/predict/rlm.py | 421 | # ========================================================================= |
| MEDIUM | dspy/predict/rlm.py | 423 | # ========================================================================= |
| MEDIUM | dspy/predict/rlm.py | 462 | # ========================================================================= |
| MEDIUM | dspy/predict/rlm.py | 464 | # ========================================================================= |
| MEDIUM | dspy/predict/rlm.py | 620 | # ========================================================================= |
| MEDIUM | dspy/predict/rlm.py | 622 | # ========================================================================= |
| MEDIUM | tests/primitives/test_python_interpreter.py | 246 | # ============================================================================= |
| MEDIUM | tests/primitives/test_python_interpreter.py | 248 | # ============================================================================= |
| MEDIUM | tests/primitives/test_python_interpreter.py | 413 | # ============================================================================= |
| MEDIUM | tests/primitives/test_python_interpreter.py | 415 | # ============================================================================= |
| MEDIUM | tests/primitives/test_python_interpreter.py | 513 | # ============================================================================= |
| MEDIUM | tests/primitives/test_python_interpreter.py | 515 | # ============================================================================= |
| MEDIUM | tests/predict/test_rlm.py | 117 | # ============================================================================ |
| MEDIUM | tests/predict/test_rlm.py | 119 | # ============================================================================ |
| MEDIUM | tests/predict/test_rlm.py | 655 | # ============================================================================ |
| MEDIUM | tests/predict/test_rlm.py | 657 | # ============================================================================ |
| MEDIUM | tests/predict/test_rlm.py | 978 | # ============================================================================ |
| MEDIUM | tests/predict/test_rlm.py | 980 | # ============================================================================ |
| MEDIUM | tests/predict/test_rlm.py | 23 | # ============================================================================ |
| MEDIUM | tests/predict/test_rlm.py | 25 | # ============================================================================ |
| MEDIUM | tests/predict/test_rlm.py | 80 | # ============================================================================ |
| MEDIUM | tests/predict/test_rlm.py | 82 | # ============================================================================ |
| MEDIUM | tests/predict/test_rlm.py | 934 | # ============================================================================ |
| MEDIUM | tests/predict/test_rlm.py | 936 | # ============================================================================ |
| MEDIUM | tests/predict/test_rlm.py | 1065 | # ============================================================================ |
| MEDIUM | tests/predict/test_rlm.py | 1067 | # ============================================================================ |
| MEDIUM | tests/predict/test_rlm.py | 1161 | # ============================================================================ |
| MEDIUM | tests/predict/test_rlm.py | 1163 | # ============================================================================ |
| MEDIUM | tests/predict/test_rlm.py | 1195 | # ============================================================================ |
| MEDIUM | tests/predict/test_rlm.py | 1197 | # ============================================================================ |
| MEDIUM | tests/predict/test_rlm.py | 847 | # ============================================================================ |
| MEDIUM | tests/predict/test_rlm.py | 849 | # ============================================================================ |
| MEDIUM | tests/teleprompt/test_bettertogether.py | 103 | # ============================================================================ |
| MEDIUM | tests/teleprompt/test_bettertogether.py | 105 | # ============================================================================ |
| MEDIUM | tests/teleprompt/test_bettertogether.py | 41 | # ============================================================================ |
| MEDIUM | tests/teleprompt/test_bettertogether.py | 43 | # ============================================================================ |
| MEDIUM | tests/teleprompt/test_bettertogether.py | 80 | # ============================================================================ |
| MEDIUM | tests/teleprompt/test_bettertogether.py | 82 | # ============================================================================ |
| 1 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | dspy/propose/grounded_proposer.py | 314 | """This method is responsible for returning the full set of new instructions for our program, given the specifie |
| MEDIUM | dspy/propose/grounded_proposer.py | 334 | # Create an instruction for each predictor |
| MEDIUM | dspy/propose/grounded_proposer.py | 376 | """This method is responsible for returning a single instruction for a given predictor, using the specified crit |
| MEDIUM | dspy/propose/grounded_proposer.py | 378 | # Create an instruction history string for our predictor |
| MEDIUM | dspy/clients/cache.py | 248 | # Create a modified request that includes the function identifier so that it's incorporated into the cache |
| MEDIUM | dspy/clients/databricks.py | 299 | # Create the directory if it doesn't exist, we don't raise an error because this is a common case. |
| MEDIUM | dspy/retrievers/embeddings.py | 234 | # Create a minimal instance without triggering embedding computation |
| MEDIUM | dspy/retrievers/databricks_rm.py | 44 | # Create a Databricks Vector Search Endpoint |
| MEDIUM | dspy/retrievers/databricks_rm.py | 51 | # Create a Databricks Direct Access Vector Search Index |
| MEDIUM | dspy/retrievers/databricks_rm.py | 66 | # Create a DatabricksRM retriever module to query the Databricks Direct Access Vector |
| MEDIUM | dspy/streaming/streamify.py | 72 | # Create the program and wrap it with streaming functionality |
| MEDIUM | dspy/streaming/streamify.py | 104 | # Create the program and wrap it with streaming functionality |
| MEDIUM | dspy/streaming/streamify.py | 130 | # Create the program and wrap it with streaming functionality |
| MEDIUM | dspy/primitives/base_module.py | 123 | # Create an empty instance. |
| MEDIUM | dspy/primitives/base_module.py | 211 | # Create the directory (and any parent directories) |
| MEDIUM | dspy/primitives/module.py | 22 | # Create the instance without invoking ``__init__`` so we can inject |
| MEDIUM | dspy/primitives/module.py | 297 | # Create a list of execution pairs (self, example) |
| MEDIUM | dspy/primitives/module.py | 300 | # Create an instance of Parallel |
| MEDIUM | dspy/adapters/two_step_adapter.py | 67 | # Create a task description for the main LM |
| MEDIUM | dspy/adapters/types/tool.py | 140 | # Create a pydantic model wrapper with a dummy field `value` to parse the arg to the correct type. |
| MEDIUM | dspy/predict/refine.py | 72 | # Define a QA module with chain of thought |
| MEDIUM | dspy/predict/refine.py | 75 | # Define a reward function that checks for one-word answers |
| MEDIUM | dspy/predict/refine.py | 79 | # Create a refined module that tries up to 3 times |
| MEDIUM | dspy/predict/code_act.py | 91 | # Define the tool functions in the interpreter |
| MEDIUM | dspy/predict/best_of_n.py | 34 | # Define a QA module with chain of thought |
| MEDIUM | dspy/predict/best_of_n.py | 37 | # Define a reward function that checks for one-word answers |
| MEDIUM | dspy/predict/best_of_n.py | 41 | # Create a refined module that tries up to 3 times |
| MEDIUM | dspy/predict/knn.py | 23 | # Create a training dataset with examples |
| MEDIUM | dspy/teleprompt/knn_fewshot.py | 29 | # Define a QA module with chain of thought |
| MEDIUM | dspy/teleprompt/knn_fewshot.py | 32 | # Create a training dataset with examples |
| MEDIUM | dspy/teleprompt/utils.py | 39 | # Create the mini-batch using the sampled indices |
| MEDIUM | dspy/teleprompt/utils.py | 221 | # Define the save path for the program |
| MEDIUM | dspy/teleprompt/utils.py | 249 | # Create a logger |
| MEDIUM | dspy/teleprompt/utils.py | 253 | # Create a file handler that logs debug and higher level messages |
| MEDIUM | dspy/teleprompt/utils.py | 260 | # Create a console handler with a higher log level |
| MEDIUM | dspy/teleprompt/mipro_optimizer_v2.py | 548 | # Initialize optimization variables |
| MEDIUM | dspy/teleprompt/mipro_optimizer_v2.py | 556 | # Define the objective function |
| MEDIUM | dspy/teleprompt/mipro_optimizer_v2.py | 568 | # Create a new candidate program |
| MEDIUM | dspy/teleprompt/gepa/instruction_proposal.py | 82 | # Create a rich multimodal examples_with_feedback that includes both text and images |
| MEDIUM | tests/clients/test_cache.py | 244 | # Define a test function |
| MEDIUM | tests/clients/test_cache.py | 301 | # Define a test function |
| MEDIUM | tests/clients/test_cache.py | 328 | # Define a test function |
| MEDIUM | tests/clients/test_cache.py | 215 | # Create a new cache instance with disk cache disabled |
| MEDIUM | tests/clients/test_cache.py | 271 | # Define a test function |
| MEDIUM | tests/test_utils/server/__init__.py | 24 | # Create a server log file used to store request logs |
| MEDIUM | tests/signatures/test_adapter_image.py | 346 | # Create a dspy.Image object from the PDF URL with download=True |
| MEDIUM | tests/signatures/test_adapter_image.py | 424 | # Create a dspy.Image from the file |
| MEDIUM | tests/utils/test_saving.py | 96 | # Create a custom handler to capture log messages |
| MEDIUM | tests/utils/test_settings.py | 127 | # Define the coroutines to be run |
| MEDIUM | tests/utils/test_settings.py | 225 | # Create a temporary Python file with our custom module |
| MEDIUM | tests/primitives/test_python_interpreter.py | 522 | # Create a string just over the threshold |
| MEDIUM | tests/primitives/test_python_interpreter.py | 534 | # Create a string with recognizable pattern just over threshold |
| MEDIUM | tests/primitives/test_base_module.py | 135 | # Create a temporary Python file with our custom module |
| MEDIUM | tests/primitives/test_base_module.py | 202 | # Create a custom handler to capture log messages |
| MEDIUM | tests/predict/test_rlm.py | 465 | # Create a field with description and constraints |
| MEDIUM | tests/predict/test_predict.py | 607 | # Define a model for datetime inputs and outputs |
| MEDIUM | tests/predict/test_predict.py | 1764 | # Create an instance of the Query model |
| MEDIUM | tests/predict/test_react.py | 215 | # Create a simple tool for testing |
| MEDIUM | tests/reliability/generate/utils.py | 297 | # Create a GeneratedTestCase object and add it to the list |
| MEDIUM | tests/teleprompt/test_copro_optimizer.py | 7 | # Define a simple metric function for testing |
| 7 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | dspy/propose/dataset_summary_generator.py | 82 | except Exception as e: |
| LOW | dspy/propose/grounded_proposer.py | 222 | except Exception as e: |
| MEDIUM | dspy/propose/grounded_proposer.py | 224 | print(f"Error getting program description. Running without program aware proposer. Error: {e}") |
| LOW | dspy/propose/grounded_proposer.py | 289 | except Exception as e: |
| MEDIUM | dspy/propose/grounded_proposer.py | 290 | print(f"Error getting source code: {e}.\n\nRunning without program aware proposer.") |
| LOW | dspy/propose/grounded_proposer.py | 301 | except Exception as e: |
| MEDIUM | dspy/propose/grounded_proposer.py | 302 | print(f"Error getting data summary: {e}.\n\nRunning without data aware proposer.") |
| LOW | dspy/clients/base_lm.py | 520 | except Exception: |
| LOW | dspy/clients/disk_serialization.py | 64 | except Exception as e: |
| LOW | dspy/clients/lm_local.py | 222 | except Exception: |
| MEDIUM | dspy/clients/lm_local.py | 200 | def train_sft_locally(model_name, train_data, train_kwargs): |
| LOW | dspy/clients/cache.py | 121 | except Exception: |
| LOW | dspy/clients/cache.py | 172 | except Exception: |
| LOW | dspy/clients/cache.py | 183 | except Exception as e: |
| LOW | dspy/clients/__init__.py | 71 | except Exception as e: |
| LOW | dspy/clients/openai.py | 109 | except Exception: |
| LOW | dspy/clients/openai.py | 119 | except Exception: |
| LOW | dspy/clients/lm.py | 257 | except Exception as e: |
| LOW | dspy/clients/lm.py | 315 | except Exception as e: |
| LOW | dspy/clients/lm.py | 394 | except Exception as err: |
| LOW | dspy/clients/databricks.py | 159 | except Exception: |
| LOW | dspy/clients/databricks.py | 259 | except Exception as e: |
| LOW | dspy/clients/databricks.py | 289 | except Exception: |
| LOW | dspy/clients/databricks.py | 298 | except Exception: |
| MEDIUM | dspy/clients/databricks.py | 263 | def _get_workspace_client() -> "WorkspaceClient": |
| LOW | dspy/clients/openai_format.py | 653 | except Exception as error: |
| LOW | dspy/clients/openai_format.py | 668 | except Exception as error: |
| LOW | dspy/clients/openai_format.py | 699 | except Exception: |
| LOW | dspy/clients/openai_format.py | 790 | except Exception: |
| LOW | dspy/utils/callback.py | 271 | except Exception as e: |
| LOW | dspy/utils/callback.py | 283 | except Exception as e: |
| LOW | dspy/utils/callback.py | 311 | except Exception as e: |
| LOW | dspy/utils/callback.py | 341 | except Exception as e: |
| LOW | dspy/utils/magicattr.py | 25 | except Exception as ex: |
| LOW | dspy/utils/parallelizer.py | 60 | except Exception as e: |
| LOW | dspy/utils/parallelizer.py | 191 | except Exception: |
| LOW | dspy/utils/langchain_tool.py | 26 | except Exception as e: |
| MEDIUM | dspy/utils/langchain_tool.py | 22 | def func(**kwargs): |
| LOW | dspy/utils/lazy_import.py | 113 | except Exception: |
| LOW | dspy/utils/unbatchify.py | 47 | except Exception as e: |
| LOW | dspy/utils/unbatchify.py | 72 | except Exception as e: |
| LOW | dspy/streaming/streaming_listener.py | 161 | except Exception: |
| LOW | dspy/streaming/streaming_listener.py | 369 | except Exception: |
| MEDIUM | dspy/streaming/streaming_listener.py | 366 | def _output_type(self) -> type | None: |
| LOW | dspy/primitives/python_interpreter.py | 227 | except Exception: |
| LOW | dspy/primitives/python_interpreter.py | 334 | except Exception as e: |
| LOW | dspy/primitives/base_module.py | 120 | except Exception: |
| LOW | dspy/primitives/base_module.py | 133 | except Exception: |
| LOW | dspy/primitives/base_module.py | 141 | except Exception: |
| LOW | dspy/primitives/base_module.py | 222 | except Exception as e: |
| LOW | dspy/primitives/base_module.py | 238 | except Exception as e: |
| LOW | dspy/adapters/chat_adapter.py | 86 | except Exception as e: |
| LOW | dspy/adapters/chat_adapter.py | 106 | except Exception as e: |
| LOW | dspy/adapters/chat_adapter.py | 238 | except Exception as e: |
| LOW | dspy/adapters/xml_adapter.py | 111 | except Exception as e: |
| LOW | dspy/adapters/_legacy_type_markers.py | 86 | except Exception: |
| LOW | dspy/adapters/utils.py | 41 | except Exception: |
| LOW | dspy/adapters/utils.py | 196 | except Exception: |
| LOW | dspy/adapters/json_adapter.py | 89 | except Exception: |
| LOW | dspy/adapters/json_adapter.py | 116 | except Exception: |
| 62 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | dspy/propose/dataset_summary_generator.py | 48 | |
| LOW | dspy/propose/utils.py | 146 | |
| LOW | dspy/propose/grounded_proposer.py | 144 | |
| LOW | dspy/propose/grounded_proposer.py | 306 | |
| LOW | dspy/propose/grounded_proposer.py | 155 | |
| LOW | dspy/clients/base_lm.py | 523 | |
| LOW | dspy/clients/cache.py | 24 | |
| LOW | dspy/clients/cache.py | 48 | |
| LOW | dspy/clients/lm.py | 620 | |
| LOW | dspy/clients/databricks.py | 305 | |
| LOW | dspy/clients/databricks.py | 51 | |
| LOW | dspy/clients/openai_format.py | 577 | |
| LOW | dspy/clients/openai_format.py | 776 | |
| LOW | dspy/retrievers/weaviate_rm.py | 73 | |
| LOW | dspy/retrievers/weaviate_rm.py | 113 | |
| LOW | dspy/core/types.py | 1573 | |
| LOW | dspy/core/types.py | 1632 | |
| LOW | dspy/core/types.py | 1788 | |
| LOW | dspy/core/types.py | 259 | |
| LOW | dspy/core/types.py | 1182 | |
| LOW | dspy/signatures/signature.py | 54 | |
| LOW | dspy/signatures/signature.py | 138 | |
| LOW | dspy/datasets/hotpotqa.py | 7 | |
| LOW | dspy/datasets/math.py | 36 | |
| LOW | dspy/datasets/alfworld/alfworld.py | 6 | |
| LOW | dspy/utils/annotation.py | 39 | |
| LOW | dspy/utils/magicattr.py | 117 | |
| LOW | dspy/utils/parallelizer.py | 105 | |
| LOW | dspy/utils/inspect_history.py | 27 | |
| LOW | dspy/utils/unbatchify.py | 51 | |
| LOW | dspy/streaming/streaming_listener.py | 241 | |
| LOW | dspy/streaming/streaming_listener.py | 312 | |
| LOW | dspy/streaming/streamify.py | 31 | |
| LOW | dspy/streaming/streamify.py | 179 | |
| LOW | dspy/primitives/example.py | 324 | |
| LOW | dspy/primitives/example.py | 335 | |
| LOW | dspy/primitives/python_interpreter.py | 429 | |
| LOW | dspy/primitives/python_interpreter.py | 470 | |
| LOW | dspy/primitives/base_module.py | 23 | |
| LOW | dspy/primitives/base_module.py | 69 | |
| LOW | dspy/primitives/base_module.py | 110 | |
| LOW | dspy/primitives/base_module.py | 34 | |
| LOW | dspy/adapters/utils.py | 93 | |
| LOW | dspy/adapters/json_adapter.py | 231 | |
| LOW | dspy/adapters/json_adapter.py | 275 | |
| LOW | dspy/adapters/base.py | 137 | |
| LOW | dspy/adapters/base.py | 280 | |
| LOW | dspy/adapters/base.py | 625 | |
| LOW | dspy/adapters/baml_adapter.py | 89 | |
| LOW | dspy/adapters/types/base_type.py | 135 | |
| LOW | dspy/adapters/types/citation.py | 133 | |
| LOW | dspy/adapters/types/citation.py | 182 | |
| LOW | dspy/adapters/types/audio.py | 125 | |
| LOW | dspy/adapters/types/tool.py | 392 | |
| LOW | dspy/adapters/types/tool.py | 284 | |
| LOW | dspy/adapters/types/image.py | 128 | |
| LOW | dspy/adapters/types/image.py | 239 | |
| LOW | dspy/predict/predict.py | 398 | |
| LOW | dspy/predict/predict.py | 141 | |
| LOW | dspy/predict/refine.py | 98 | |
| 36 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | dspy/teleprompt/bootstrap.py | 121 | assert predictor1.signature.equals( |
| HIGH | dspy/teleprompt/gepa/gepa_utils.py | 224 | trace_instances = [t for t in trace if t[0].signature.equals(module.signature)] |
| HIGH | tests/signatures/test_signature.py | 117 | assert sig1.equals(sig2) |
| HIGH | tests/signatures/test_signature.py | 123 | assert not sig1.equals(sig2) |
| HIGH | tests/signatures/test_signature.py | 131 | assert TestSignature.equals(TestSignature) |
| HIGH | tests/signatures/test_signature.py | 486 | assert sig1.equals(sig2) |
| HIGH | tests/signatures/test_signature.py | 528 | assert Sig1.equals(Sig2) |
| HIGH | tests/adapters/test_chat_adapter.py | 796 | '{"type": "null"}], "default": null, "title": "Document Title"}, "end_char_index": ' |
| HIGH | tests/adapters/test_chat_adapter.py | 799 | '"string"}, {"type": "null"}], "default": null, "title": "Supported Text"}}, ' |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | dspy/clients/provider.py | 35 | # Check if job is done |
| LOW | dspy/clients/openai.py | 141 | # Check if there is an active job |
| LOW | dspy/signatures/signature.py | 689 | # Check if it's a built-in known type or in the provided names |
| LOW | dspy/signatures/signature.py | 695 | # Check if it matches any known built-in type by name |
| LOW | dspy/primitives/module.py | 339 | # Check if forward is called through __call__ or directly |
| LOW | dspy/adapters/utils.py | 133 | # Check if the identifier is a valid enum member value *before* checking if it's a valid enum |
| LOW | dspy/adapters/base.py | 558 | # Check if all fields are present and not None |
| LOW | dspy/adapters/base.py | 561 | # Check if demo has at least one input and one output field |
| LOW | dspy/adapters/types/citation.py | 193 | # Check if the chunk has citation data in provider_specific_fields |
| LOW | dspy/adapters/types/citation.py | 215 | # Check if the response contains citations in the expected format |
| LOW | dspy/adapters/types/reasoning.py | 159 | # Check if this is a valid string method/attribute |
| LOW | dspy/adapters/types/tool.py | 101 | # Check if the type (or its origin) is a subclass of Pydantic's BaseModel |
| LOW | dspy/teleprompt/bettertogether.py | 579 | # Check if this is the best score so far |
| LOW | tests/docs/test_mkdocs_links.py | 9 | # Read file and extract nav section |
| LOW | tests/docs/test_mkdocs_links.py | 28 | # Check if files exist |
| LOW | tests/reliability/generate/utils.py | 278 | # Check if the directory contains a program.py and an inputs directory |
| LOW | tests/reliability/generate/utils.py | 684 | # Read the file contents |
| LOW | tests/teleprompt/test_copro_optimizer.py | 148 | # Check if the results_best and results_latest contain valid statistics |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | docs/docs/tutorials/async/index.md | 60 | os.environ["OPENAI_API_KEY"] = "your_api_key" |
| HIGH | docs/docs/tutorials/async/index.md | 85 | os.environ["OPENAI_API_KEY"] = "your_api_key" |
| HIGH | docs/docs/tutorials/async/index.md | 142 | os.environ["OPENAI_API_KEY"] = "your_api_key" |
| HIGH | docs/docs/tutorials/streaming/index.md | 23 | os.environ["OPENAI_API_KEY"] = "your_api_key" |
| HIGH | docs/docs/tutorials/streaming/index.md | 471 | os.environ["OPENAI_API_KEY"] = "your_api_key" |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | tests/adapters/test_json_adapter.py | 0 | answer the question with multiple answers and scores |
| HIGH | tests/adapters/test_chat_adapter.py | 0 | answer the question with multiple answers and scores |
| HIGH | tests/adapters/test_chat_adapter.py | 0 | answer the question with multiple answers and scores |
| HIGH | tests/adapters/test_xml_adapter.py | 0 | answer the question with multiple answers and scores |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | dspy/adapters/baml_adapter.py | 208 | # PatientDetails(name='John Doe', age=45, address=PatientAddress(street='123 Main St', city='Anytown', country='US') |
| LOW | dspy/adapters/baml_adapter.py | 208 | # PatientDetails(name='John Doe', age=45, address=PatientAddress(street='123 Main St', city='Anytown', country='US') |
| LOW | tests/adapters/test_baml_adapter.py | 258 | name="John Doe", age=45, address=PatientAddress(street="123 Main St", city="Anytown", country="US") |
| LOW | tests/adapters/test_baml_adapter.py | 258 | name="John Doe", age=45, address=PatientAddress(street="123 Main St", city="Anytown", country="US") |
| LOW | tests/adapters/test_baml_adapter.py | 265 | assert '"name": "John Doe"' in user_message |
| LOW | tests/adapters/test_baml_adapter.py | 267 | assert '"street": "123 Main St"' in user_message |
| LOW | tests/adapters/test_baml_adapter.py | 281 | patient = PatientDetails(name="Jane Doe", age=30) |
| LOW | tests/adapters/test_baml_adapter.py | 287 | assert '"name": "Jane Doe"' in user_message |
| LOW | tests/adapters/test_baml_adapter.py | 525 | choices=[Choices(message=Message(content='{"patient": {"name": "John Doe", "age": 28}}'))], |
| LOW | tests/adapters/test_baml_adapter.py | 534 | assert result[0]["patient"].name == "John Doe" |
| LOW | tests/adapters/test_baml_adapter.py | 623 | user_profile = UserProfile(name="John Doe", email="john@example.com", age=30) |
| LOW | tests/adapters/test_baml_adapter.py | 635 | assert '"name": "John Doe"' in user_message |
| LOW | tests/adapters/test_tool.py | 344 | assert result["primary_address"]["street"] == "123 Main St" |
| LOW | tests/adapters/test_tool.py | 333 | Address(street="123 Main St", city="Test City", zip_code="12345", is_primary=True), |
| LOW | docs/docs/learn/programming/adapters.md | 194 | "scientists_involved": ["John Doe", "Jane Smith"], |
| LOW | docs/docs/learn/evaluation/data.md | 59 | Values can be accessed using the `.`(dot) operator. You can access the value of key `name` in defined object `Example(na |
| LOW | docs/docs/deep-dive/data-handling/examples.md | 60 | Values can be accessed using the `.`(dot) operator. You can access the value of key `name` in defined object `Example(na |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | dspy/predict/retry.py | 1 | # import copy |
| LOW | dspy/predict/retry.py | 21 | # prefix="Previous " + actual_prefix, |
| LOW | dspy/predict/retry.py | 41 | # # Convert the dict past_outputs={"answer": ...} to kwargs |
| LOW | dspy/predict/retry.py | 61 | # pred = self.forward(**kwargs) |
| LOW | dspy/teleprompt/grpo.py | 261 | |
| LOW | dspy/teleprompt/grpo.py | 521 | logger.warning(f"GRPOGroup has no diversity. This could be due to low temperature, or low number |
| LOW | dspy/teleprompt/bootstrap_finetune.py | 221 | # ) -> dict[str, Any]: |
| LOW | tests/predict/test_retry.py | 1 | # import functools |
| LOW | tests/predict/test_retry.py | 21 | # result = retry_module.forward( |
| LOW | tests/predict/test_retry.py | 41 | # print(f"SimpleModule got {result.answer=}") |
| LOW | tests/predict/test_retry.py | 61 | # # class AnswerQuestion(dspy.Signature): |
| LOW | tests/predict/test_retry.py | 81 | # # return result |
| LOW | tests/predict/test_predict.py | 241 | |
| LOW | tests/predict/test_predict.py | 261 | # content="¿Qué tal?", |
| LOW | tests/reliability/reliability_conf.yaml | 1 | adapter: chat |
| LOW | tests/reliability/reliability_conf.yaml | 21 | - model_name: "gpt-4-turbo" |
| LOW | tests/reliability/reliability_conf.yaml | 41 | - model_name: "claude-3.5-haiku" |
| LOW | tests/reliability/reliability_conf.yaml | 61 | - model_name: "llama-3.1-70b-instruct" |
| LOW | docs/docs/stylesheets/home.css | 601 | #hp-tab-optimize:checked ~ .hp-tabs-wrapper .hp-tab-panels #hp-panel-optimize { display: grid; } |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | dspy/propose/dataset_summary_generator.py | 22 | """I will also provide you with a few observations I have already made. Please add your own observations or if you |
| LOW | dspy/adapters/utils.py | 66 | # (e.g. the value is a JSON string), just use the string representation of the value |
| LOW | dspy/evaluate/evaluate.py | 38 | # available, this method will simply return the input string. |
| MEDIUM | dspy/teleprompt/gepa/instruction_proposal.py | 308 | # instead of just the current instruction, for more holistic instruction proposals. |
| MEDIUM | dspy/dsp/utils/settings.py | 153 | # We check its existence and type to be more robust. |
| LOW | tests/predict/test_rlm.py | 290 | # Unclosed fence (just return the body) |
| MEDIUM | tests/predict/test_rlm.py | 274 | """Tests for robust fenced-code extraction.""" |
| MEDIUM | tests/teleprompt/test_gepa_instruction_proposer.py | 158 | # Use a robust dummy LM with enough responses for optimization steps |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/clients/test_cache.py | 246 | def test_function(prompt, model): |
| LOW | tests/clients/test_cache.py | 303 | async def test_function(prompt, model): |
| LOW | tests/clients/test_cache.py | 330 | def test_function(**kwargs): |
| LOW | tests/utils/test_annotation.py | 6 | def test_function(): |
| LOW | tests/utils/test_annotation.py | 17 | def test_function(): |
| LOW | tests/utils/test_annotation.py | 55 | def test_function(): |
| LOW | tests/utils/test_annotation.py | 64 | def test_function(): |
| LOW | tests/utils/test_annotation.py | 72 | def test_function(): |
| LOW | tests/utils/test_annotation.py | 84 | def test_function(): |
| Severity | File | Line | Snippet |
|---|---|---|---|
| CRITICAL | docs/docs/diving-deeper/adapters.md | 147 | **`dspy.adapters.types.tool.ToolCalls.from_dict_list(...)`** |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | dspy/signatures/signature.py | 801 | # Step 1: Convert camelCase to snake_case |
| LOW | dspy/signatures/signature.py | 809 | # Step 2: Handle numbers by adding underscores around them |
| LOW | dspy/signatures/signature.py | 823 | # Step 3: Convert to Title Case while preserving acronyms |
| LOW | dspy/teleprompt/mipro_optimizer_v2.py | 230 | # Step 1: Bootstrap few-shot examples |
| LOW | dspy/teleprompt/mipro_optimizer_v2.py | 243 | # Step 2: Propose instruction candidates |
| LOW | dspy/teleprompt/mipro_optimizer_v2.py | 261 | # Step 3: Find optimal prompt parameters |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | docs/docs/community/built-with-dspy.md | 22 | | **[MedVAL](https://arxiv.org/abs/2507.03152)** | Expert-level validation of AI-generated medical text with scalable la |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | tests/clients/test_lm.py | 1447 |