DSPy: The framework for programming—not prompting—language models
This report presents the forensic synthetic code analysis of stanfordnlp/dspy, a Python project with 36,109 GitHub stars. SynthScan v2.0 examined 84,086 lines of code across 454 source files, recording 2035 pattern matches distributed across 24 syntactic categories. The overall adjusted score of 31.0 places this repository in the Strong AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 2035 distinct pattern matches across 24 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | dspy/propose/dataset_summary_generator.py | 30 | def order_input_keys_in_string(unordered_repr): | CODE |
| LOW | dspy/propose/propose_base.py | 9 | def propose_instructions_for_program(self): | CODE |
| LOW | dspy/propose/propose_base.py | 12 | def propose_instruction_for_predictor(self): | CODE |
| LOW | dspy/propose/utils.py | 22 | def create_instruction_set_history_string(base_program, trial_logs, top_n): | CODE |
| LOW | dspy/propose/utils.py | 58 | def parse_list_of_instructions(instruction_string): | CODE |
| LOW | dspy/propose/utils.py | 70 | def get_program_instruction_set_string(program): | CODE |
| LOW | dspy/propose/utils.py | 78 | def create_predictor_level_history_string(base_program, predictor_i, trial_logs, top_n): | CODE |
| LOW | dspy/propose/grounded_proposer.py | 64 | def generate_instruction_class( | CODE |
| LOW | dspy/propose/grounded_proposer.py | 155 | def gather_examples_from_sets(candidate_sets, max_examples): | CODE |
| LOW⚡ | dspy/propose/grounded_proposer.py | 306 | def propose_instructions_for_program( | CODE |
| LOW⚡ | dspy/propose/grounded_proposer.py | 366 | def propose_instruction_for_predictor( | CODE |
| LOW | dspy/clients/base_lm.py | 208 | def _declares_forward_contract(self) -> bool: | CODE |
| LOW | dspy/clients/base_lm.py | 228 | def _validate_typed_lm_response(self, response: Any) -> LMResponse: | CODE |
| LOW | dspy/clients/base_lm.py | 237 | def _validate_legacy_lm_response( | CODE |
| LOW | dspy/clients/base_lm.py | 267 | def supports_function_calling(self) -> bool: | CODE |
| LOW | dspy/clients/base_lm.py | 466 | def _legacy_prompt_from_items(self, items: tuple[Any, ...], *, prompt: str | None) -> str | None: | CODE |
| LOW | dspy/clients/base_lm.py | 510 | def _legacy_forward_as_lm_response(self, request: LMRequest) -> LMResponse: | CODE |
| LOW | dspy/clients/base_lm.py | 526 | async def _legacy_aforward_as_lm_response(self, request: LMRequest) -> LMResponse: | CODE |
| LOW | dspy/clients/base_lm.py | 542 | def _legacy_outputs_to_lm_response( | CODE |
| LOW | dspy/clients/base_lm.py | 838 | def _extract_citations_from_response(self, choice): | CODE |
| LOW | dspy/clients/embedding.py | 169 | def _cached_compute_embeddings(model, batch_inputs, caching=True, **kwargs): | CODE |
| LOW | dspy/clients/embedding.py | 185 | async def _cached_acompute_embeddings(model, batch_inputs, caching=True, **kwargs): | CODE |
| LOW | dspy/clients/__init__.py | 87 | def configure_litellm_logging(level: str = "ERROR"): | CODE |
| LOW | dspy/clients/utils_finetune.py | 131 | def find_data_errors_completion(data_dict: dict[str, str]) -> str | None: | CODE |
| LOW | dspy/clients/utils_finetune.py | 164 | def find_data_error_chat_message(message: dict[str, Any]) -> str | None: | CODE |
| LOW⚡ | dspy/clients/openai.py | 123 | def is_terminal_training_status(status: TrainingStatus) -> bool: | CODE |
| LOW | dspy/clients/_litellm.py | 12 | def _configure_litellm_defaults(litellm: types.ModuleType) -> None: | CODE |
| LOW | dspy/clients/_litellm.py | 38 | def is_litellm_context_window_error(error: Exception) -> bool: | CODE |
| LOW | dspy/clients/lm.py | 47 | def _is_openai_reasoning_model(model: str) -> bool: | CODE |
| LOW | dspy/clients/lm.py | 148 | def supports_function_calling(self) -> bool: | CODE |
| LOW | dspy/clients/lm.py | 172 | def _get_cached_completion_fn(self, completion_fn, cache): | CODE |
| LOW | dspy/clients/lm.py | 447 | def _get_stream_completion_fn( | CODE |
| LOW | dspy/clients/lm.py | 588 | def litellm_responses_completion(request: dict[str, Any], num_retries: int, cache: dict[str, Any] | None = None): | CODE |
| LOW | dspy/clients/lm.py | 604 | async def alitellm_responses_completion(request: dict[str, Any], num_retries: int, cache: dict[str, Any] | None = None): | CODE |
| LOW | dspy/clients/lm.py | 620 | def _convert_chat_request_to_responses_request(request: dict[str, Any]): | CODE |
| LOW | dspy/clients/lm.py | 660 | def _convert_content_item_to_responses_format(item: dict[str, Any]) -> dict[str, Any]: | CODE |
| LOW | dspy/clients/lm.py | 700 | def _add_dspy_identifier_to_headers(headers: dict[str, Any] | None = None): | CODE |
| LOW | dspy/clients/lm.py | 711 | def _safe_litellm_exception_class(name: str) -> type[Exception] | None: | CODE |
| LOW | dspy/clients/lm.py | 716 | def _lm_error_class_from_litellm_exception(exc: Exception) -> type[LMError] | None: | CODE |
| LOW | dspy/clients/lm.py | 751 | def _lm_error_class_from_status(status: int | None) -> type[LMError]: | CODE |
| LOW | dspy/clients/databricks.py | 273 | def _create_directory_in_databricks_unity_catalog(w: "WorkspaceClient", databricks_unity_catalog_path: str): | CODE |
| LOW | dspy/clients/databricks.py | 346 | def _validate_completion_data(data: dict[str, Any]): | CODE |
| LOW⚡ | dspy/clients/openai_format.py | 123 | def to_openai_responses_request(request: LMRequest) -> dict[str, Any]: | CODE |
| LOW⚡ | dspy/clients/openai_format.py | 163 | def parts_to_responses_content(parts: list[Any]) -> list[dict[str, Any]]: | CODE |
| LOW⚡ | dspy/clients/openai_format.py | 170 | def tool_call_to_responses_input(tool_call_part: LMToolCallPart) -> dict[str, Any]: | CODE |
| LOW⚡ | dspy/clients/openai_format.py | 180 | def content_block_to_responses(block: dict[str, Any]) -> dict[str, Any]: | CODE |
| LOW⚡ | dspy/clients/openai_format.py | 536 | def completion_to_lm_response(response: Any, request: LMRequest) -> LMResponse: | CODE |
| LOW⚡ | dspy/clients/openai_format.py | 645 | def provider_tool_call_to_part(tool_call: Any) -> LMToolCallPart: | CODE |
| LOW⚡ | dspy/clients/openai_format.py | 661 | def responses_function_call_to_part(output_item: Any) -> LMToolCallPart: | CODE |
| LOW⚡ | dspy/clients/openai_format.py | 689 | def extract_citations_from_choice(choice: Any) -> list[LMCitationPart]: | CODE |
| LOW⚡ | dspy/clients/openai_format.py | 704 | def responses_annotations_to_citations(content_item: Any) -> list[LMCitationPart]: | CODE |
| LOW⚡ | dspy/clients/openai_format.py | 898 | def lm_response_from_legacy_outputs(outputs: list[dict[str, Any] | str | None], request: LMRequest) -> LMResponse: | CODE |
| LOW⚡ | dspy/clients/openai_format.py | 905 | def legacy_outputs_from_lm_response(response: LMResponse) -> list[dict[str, Any] | str | None]: | CODE |
| LOW | dspy/clients/openai_format.py | 138 | def message_to_responses_input_items(message: LMMessage) -> list[dict[str, Any]]: | CODE |
| LOW | dspy/clients/openai_format.py | 300 | def document_to_openai_blocks(document: LMDocumentPart) -> list[dict[str, Any]]: | CODE |
| LOW | dspy/clients/openai_format.py | 369 | def assistant_tool_call_to_openai(call: LMToolCallPart) -> dict[str, Any]: | CODE |
| LOW | dspy/clients/openai_format.py | 456 | def reasoning_to_responses_kwargs(reasoning: Any) -> dict[str, Any]: | CODE |
| LOW | dspy/clients/openai_format.py | 465 | def _validate_openai_reasoning_temperature(config: LMConfig, *, model: str | None, endpoint: str) -> None: | CODE |
| LOW | dspy/clients/openai_format.py | 488 | def _uses_max_completion_tokens(model: str | None) -> bool: | CODE |
| LOW | dspy/clients/openai_format.py | 492 | def _is_openai_reasoning_model(model: str | None) -> bool: | CODE |
| 1064 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | dspy/clients/base_lm.py | 689 | Reconstruct an LM from `dump_state` output. Legacy states without a class marker load as `dspy.LM`. Custom LM | STRING |
| HIGH | dspy/clients/provider.py | 13 | A future representing an asynchronous model fine-tuning job. This class extends `concurrent.futures.Future` to repr | STRING |
| HIGH | dspy/clients/provider.py | 82 | A job for reinforcement learning-based fine-tuning. This class represents a reinforcement learning fine-tuning job | STRING |
| HIGH | dspy/retrievers/embeddings.py | 151 | Load the embeddings index from disk into the current instance. Args: path: Directory path | STRING |
| HIGH | dspy/retrievers/embeddings.py | 211 | Create an Embeddings instance from a saved index. This is the recommended way to load saved embeddings | STRING |
| 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, | STRING |
| 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 | STRING |
| HIGH | dspy/core/types.py | 1362 | Create a user message for a direct LM call. A user message contains the request or data you want the model to answe | STRING |
| HIGH | dspy/core/types.py | 1446 | Create an assistant message for a direct LM call. An assistant message represents a previous model response. Use it | STRING |
| HIGH | dspy/core/types.py | 1501 | Create a tool-result message for a direct LM call. A tool-result message sends the output of a tool back to the mod | STRING |
| HIGH | dspy/signatures/signature.py | 279 | Return a new Signature class with identical fields and new instructions. This method does not mutate `cls`. It | STRING |
| HIGH | dspy/signatures/signature.py | 308 | Return a new Signature class with identical fields and `instructions` appended to the existing instructions. Th | STRING |
| HIGH | dspy/signatures/signature.py | 363 | Insert a field at index 0 of the `inputs` or `outputs` section. Args: name (str): Field name to add | STRING |
| HIGH | dspy/signatures/signature.py | 390 | Insert a field at the end of the `inputs` or `outputs` section. Args: name (str): Field name to add | STRING |
| HIGH | dspy/signatures/signature.py | 417 | Return a new Signature class without the given field. If `name` is not present, the fields are unchanged (no er | STRING |
| HIGH | dspy/signatures/signature.py | 452 | Insert a field at a specific position among inputs or outputs. Negative indices are supported (e.g., `-1` appen | STRING |
| HIGH | dspy/signatures/signature.py | 564 | Create a new Signature subclass with the specified fields and instructions. Args: signature: Either a strin | STRING |
| HIGH | dspy/signatures/signature.py | 686 | Recursively parse an AST node representing a type annotation. This function converts Python's Abstract Syntax Tree | STRING |
| 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 | STRING |
| HIGH | dspy/primitives/code_interpreter.py | 110 | Execute Python code and return the result. Args: code: Python code to execute variables | STRING |
| 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 | STRING |
| 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 | STRING |
| HIGH | dspy/primitives/module.py | 226 | Apply a function to all named predictors in this module. This method iterates through all Predict instances in | STRING |
| HIGH | dspy/primitives/module.py | 280 | Processes a list of dspy.Example instances in parallel using the Parallel module. Args: ex | STRING |
| HIGH | dspy/adapters/types/citation.py | 92 | Convert a list of dictionaries to a Citations instance. Args: citations_dicts: A list of dictionari | STRING |
| HIGH | dspy/adapters/types/tool.py | 220 | Build a DSPy tool from a LangChain tool. Args: tool: The LangChain tool to convert. | STRING |
| HIGH | dspy/adapters/types/tool.py | 285 | Execute this individual tool call and return its result. Args: functions: Functions to sear | STRING |
| HIGH | dspy/adapters/types/tool.py | 346 | Convert a list of dictionaries to a ToolCalls instance. Args: dict_list: A list of dictionaries, wh | STRING |
| 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 | STRING |
| HIGH | dspy/evaluate/metrics.py | 12 | Compute the Exact Match (EM) metric between a prediction and reference answers. Returns True if any reference exact | STRING |
| 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 | STRING |
| HIGH | dspy/evaluate/metrics.py | 64 | Compute the maximum HotPotQA-style F1 score against reference answers. Like `F1`, but if either normalized side is | STRING |
| HIGH | dspy/evaluate/metrics.py | 88 | Normalize text for string and token comparisons. Steps: 1) Unicode NFD normalization 2) lowercasing | STRING |
| HIGH | dspy/evaluate/metrics.py | 127 | Compute boolean exact match after normalization. Args: prediction (str): Predicted answer. ground_t | STRING |
| HIGH | dspy/evaluate/metrics.py | 145 | Compute token-level F1 between prediction and reference (after normalization). Strings are normalized (see `normali | STRING |
| HIGH | dspy/evaluate/metrics.py | 184 | Compute HotPotQA-style token F1 with special labels. If either normalized string is in {"yes", "no", "noanswer"} an | STRING |
| HIGH | dspy/evaluate/metrics.py | 222 | Compute token-level precision of prediction against reference (after normalization). Precision is (# overlapping to | STRING |
| 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 | STRING |
| 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 | STRING |
| HIGH | dspy/evaluate/evaluate.py | 129 | Args: program (dspy.Module): The DSPy program to evaluate. metric (Callable): The metri | STRING |
| HIGH | dspy/predict/rlm.py | 672 | Execute RLM to produce outputs from the given inputs. Args: interpreter: Optional caller-owned inte | STRING |
| HIGH | dspy/predict/rlm.py | 761 | Async version of forward(). Execute RLM to produce outputs. Args: interpreter: Optional caller-owne | STRING |
| 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 | STRING |
| 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 | STRING |
| HIGH | dspy/teleprompt/bettertogether.py | 211 | Compile and optimize a student program using a sequence of optimization strategies. Executes the optimizers spe | STRING |
| HIGH | dspy/teleprompt/gepa/gepa.py | 196 | ... ``` GEPA can also be used as a batch inference-time search strategy, by passing `valset=trainset, | STRING |
| HIGH | tests/mock_interpreter.py | 75 | Execute code and return the next scripted response. Args: code: The code that would be executed (re | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | dspy/__init__.py | 1 | CODE | |
| LOW | dspy/__init__.py | 2 | CODE | |
| LOW | dspy/__init__.py | 3 | CODE | |
| LOW | dspy/__init__.py | 4 | CODE | |
| LOW | dspy/__init__.py | 5 | CODE | |
| LOW | dspy/__init__.py | 7 | CODE | |
| LOW | dspy/__init__.py | 8 | CODE | |
| LOW | dspy/__init__.py | 9 | CODE | |
| LOW | dspy/__init__.py | 9 | CODE | |
| LOW | dspy/__init__.py | 9 | CODE | |
| LOW | dspy/__init__.py | 9 | CODE | |
| LOW | dspy/__init__.py | 9 | CODE | |
| LOW | dspy/__init__.py | 9 | CODE | |
| LOW | dspy/__init__.py | 9 | CODE | |
| LOW | dspy/__init__.py | 9 | CODE | |
| LOW | dspy/__init__.py | 9 | CODE | |
| LOW | dspy/__init__.py | 9 | CODE | |
| LOW | dspy/__init__.py | 9 | CODE | |
| LOW | dspy/__init__.py | 9 | CODE | |
| LOW | dspy/__init__.py | 9 | CODE | |
| LOW | dspy/__init__.py | 9 | CODE | |
| LOW | dspy/__init__.py | 9 | CODE | |
| LOW | dspy/__init__.py | 10 | CODE | |
| LOW | dspy/__init__.py | 10 | CODE | |
| LOW | dspy/__init__.py | 10 | CODE | |
| LOW | dspy/__init__.py | 10 | CODE | |
| LOW | dspy/__init__.py | 10 | CODE | |
| LOW | dspy/__init__.py | 10 | CODE | |
| LOW | dspy/__init__.py | 10 | CODE | |
| LOW | dspy/__init__.py | 10 | CODE | |
| LOW | dspy/__init__.py | 10 | CODE | |
| LOW | dspy/__init__.py | 10 | CODE | |
| LOW | dspy/__init__.py | 22 | CODE | |
| LOW | dspy/__init__.py | 23 | CODE | |
| LOW | dspy/__init__.py | 23 | CODE | |
| LOW | dspy/__init__.py | 23 | CODE | |
| LOW | dspy/__init__.py | 23 | CODE | |
| LOW | dspy/__init__.py | 23 | CODE | |
| LOW | dspy/__init__.py | 23 | CODE | |
| LOW | dspy/__init__.py | 23 | CODE | |
| LOW | dspy/__init__.py | 23 | CODE | |
| LOW | dspy/__init__.py | 23 | CODE | |
| LOW | dspy/__init__.py | 23 | CODE | |
| LOW | dspy/__init__.py | 23 | CODE | |
| LOW | dspy/__init__.py | 23 | CODE | |
| LOW | dspy/__init__.py | 23 | CODE | |
| LOW | dspy/__init__.py | 23 | CODE | |
| LOW | dspy/__init__.py | 23 | CODE | |
| LOW | dspy/__init__.py | 23 | CODE | |
| LOW | dspy/__init__.py | 23 | CODE | |
| LOW | dspy/__init__.py | 23 | CODE | |
| LOW | dspy/__init__.py | 43 | CODE | |
| LOW | dspy/__init__.py | 43 | CODE | |
| LOW | dspy/__init__.py | 44 | CODE | |
| LOW | dspy/__init__.py | 45 | CODE | |
| LOW | dspy/__init__.py | 47 | CODE | |
| LOW | dspy/__init__.py | 48 | CODE | |
| LOW | dspy/__init__.py | 51 | CODE | |
| LOW | dspy/__init__.py | 53 | CODE | |
| LOW | dspy/__init__.py | 53 | CODE | |
| 190 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | dspy/clients/openai_format.py | 114 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | dspy/clients/openai_format.py | 120 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | dspy/clients/openai_format.py | 527 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | dspy/clients/openai_format.py | 533 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | dspy/clients/openai_format.py | 798 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | dspy/clients/openai_format.py | 800 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | dspy/clients/openai_format.py | 888 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | dspy/clients/openai_format.py | 895 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | dspy/clients/openai_format.py | 66 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | dspy/clients/openai_format.py | 73 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | dspy/clients/openai_format.py | 203 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | dspy/clients/openai_format.py | 208 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | dspy/clients/openai_format.py | 231 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | dspy/clients/openai_format.py | 237 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | dspy/primitives/python_interpreter.py | 35 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | dspy/primitives/python_interpreter.py | 37 | # ============================================================================= | COMMENT |
| MEDIUM | dspy/predict/rlm.py | 182 | # ========================================================================= | COMMENT |
| MEDIUM | dspy/predict/rlm.py | 184 | # ========================================================================= | COMMENT |
| MEDIUM | dspy/predict/rlm.py | 312 | # ========================================================================= | COMMENT |
| MEDIUM | dspy/predict/rlm.py | 314 | # ========================================================================= | COMMENT |
| MEDIUM | dspy/predict/rlm.py | 366 | # ========================================================================= | COMMENT |
| MEDIUM | dspy/predict/rlm.py | 368 | # ========================================================================= | COMMENT |
| MEDIUM | dspy/predict/rlm.py | 452 | # ========================================================================= | COMMENT |
| MEDIUM | dspy/predict/rlm.py | 454 | # ========================================================================= | COMMENT |
| MEDIUM | dspy/predict/rlm.py | 509 | # ========================================================================= | COMMENT |
| MEDIUM | dspy/predict/rlm.py | 511 | # ========================================================================= | COMMENT |
| MEDIUM | dspy/predict/rlm.py | 667 | # ========================================================================= | COMMENT |
| MEDIUM | dspy/predict/rlm.py | 669 | # ========================================================================= | COMMENT |
| MEDIUM⚡ | tests/primitives/test_python_interpreter.py | 359 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/primitives/test_python_interpreter.py | 361 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/primitives/test_python_interpreter.py | 747 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/primitives/test_python_interpreter.py | 749 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/primitives/test_python_interpreter.py | 847 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/primitives/test_python_interpreter.py | 849 | # ============================================================================= | COMMENT |
| MEDIUM | tests/primitives/test_python_interpreter.py | 551 | # ============================================================================= | COMMENT |
| MEDIUM | tests/primitives/test_python_interpreter.py | 553 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/predict/test_rlm.py | 117 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/predict/test_rlm.py | 119 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/predict/test_rlm.py | 869 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/predict/test_rlm.py | 871 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/predict/test_rlm.py | 1192 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/predict/test_rlm.py | 1194 | # ============================================================================ | COMMENT |
| MEDIUM | tests/predict/test_rlm.py | 23 | # ============================================================================ | COMMENT |
| MEDIUM | tests/predict/test_rlm.py | 25 | # ============================================================================ | COMMENT |
| MEDIUM | tests/predict/test_rlm.py | 80 | # ============================================================================ | COMMENT |
| MEDIUM | tests/predict/test_rlm.py | 82 | # ============================================================================ | COMMENT |
| MEDIUM | tests/predict/test_rlm.py | 1148 | # ============================================================================ | COMMENT |
| MEDIUM | tests/predict/test_rlm.py | 1150 | # ============================================================================ | COMMENT |
| MEDIUM | tests/predict/test_rlm.py | 1279 | # ============================================================================ | COMMENT |
| MEDIUM | tests/predict/test_rlm.py | 1281 | # ============================================================================ | COMMENT |
| MEDIUM | tests/predict/test_rlm.py | 1423 | # ============================================================================ | COMMENT |
| MEDIUM | tests/predict/test_rlm.py | 1425 | # ============================================================================ | COMMENT |
| MEDIUM | tests/predict/test_rlm.py | 1457 | # ============================================================================ | COMMENT |
| MEDIUM | tests/predict/test_rlm.py | 1459 | # ============================================================================ | COMMENT |
| MEDIUM | tests/predict/test_rlm.py | 1061 | # ============================================================================ | STRING |
| MEDIUM | tests/predict/test_rlm.py | 1063 | # ============================================================================ | STRING |
| MEDIUM⚡ | tests/teleprompt/test_bettertogether.py | 103 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/teleprompt/test_bettertogether.py | 105 | # ============================================================================ | COMMENT |
| MEDIUM | tests/teleprompt/test_bettertogether.py | 41 | # ============================================================================ | COMMENT |
| MEDIUM | tests/teleprompt/test_bettertogether.py | 43 | # ============================================================================ | COMMENT |
| 3 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| 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 | STRING |
| MEDIUM | dspy/propose/grounded_proposer.py | 334 | # Create an instruction for each predictor | COMMENT |
| MEDIUM⚡ | dspy/propose/grounded_proposer.py | 376 | """This method is responsible for returning a single instruction for a given predictor, using the specified crit | STRING |
| MEDIUM⚡ | dspy/propose/grounded_proposer.py | 378 | # Create an instruction history string for our predictor | COMMENT |
| MEDIUM | dspy/clients/cache.py | 248 | # Create a modified request that includes the function identifier so that it's incorporated into the cache | COMMENT |
| 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. | COMMENT |
| MEDIUM | dspy/retrievers/embeddings.py | 234 | # Create a minimal instance without triggering embedding computation | COMMENT |
| MEDIUM | dspy/retrievers/databricks_rm.py | 44 | # Create a Databricks Vector Search Endpoint | STRING |
| MEDIUM | dspy/retrievers/databricks_rm.py | 51 | # Create a Databricks Direct Access Vector Search Index | STRING |
| MEDIUM | dspy/retrievers/databricks_rm.py | 66 | # Create a DatabricksRM retriever module to query the Databricks Direct Access Vector | STRING |
| MEDIUM | dspy/streaming/streamify.py | 72 | # Create the program and wrap it with streaming functionality | STRING |
| MEDIUM | dspy/streaming/streamify.py | 104 | # Create the program and wrap it with streaming functionality | STRING |
| MEDIUM | dspy/streaming/streamify.py | 130 | # Create the program and wrap it with streaming functionality | STRING |
| MEDIUM⚡ | dspy/primitives/base_module.py | 123 | # Create an empty instance. | COMMENT |
| MEDIUM | dspy/primitives/base_module.py | 211 | # Create the directory (and any parent directories) | COMMENT |
| MEDIUM | dspy/primitives/module.py | 22 | # Create the instance without invoking ``__init__`` so we can inject | COMMENT |
| MEDIUM | dspy/primitives/module.py | 297 | # Create a list of execution pairs (self, example) | COMMENT |
| MEDIUM | dspy/primitives/module.py | 300 | # Create an instance of Parallel | COMMENT |
| MEDIUM | dspy/adapters/two_step_adapter.py | 67 | # Create a task description for the main LM | COMMENT |
| 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. | COMMENT |
| MEDIUM⚡ | dspy/predict/refine.py | 72 | # Define a QA module with chain of thought | STRING |
| MEDIUM⚡ | dspy/predict/refine.py | 75 | # Define a reward function that checks for one-word answers | STRING |
| MEDIUM⚡ | dspy/predict/refine.py | 79 | # Create a refined module that tries up to 3 times | STRING |
| MEDIUM | dspy/predict/code_act.py | 113 | # Define the tool functions in the interpreter | COMMENT |
| MEDIUM⚡ | dspy/predict/best_of_n.py | 34 | # Define a QA module with chain of thought | STRING |
| MEDIUM⚡ | dspy/predict/best_of_n.py | 37 | # Define a reward function that checks for one-word answers | STRING |
| MEDIUM⚡ | dspy/predict/best_of_n.py | 41 | # Create a refined module that tries up to 3 times | STRING |
| MEDIUM | dspy/predict/knn.py | 23 | # Create a training dataset with examples | STRING |
| MEDIUM⚡ | dspy/teleprompt/knn_fewshot.py | 29 | # Define a QA module with chain of thought | STRING |
| MEDIUM⚡ | dspy/teleprompt/knn_fewshot.py | 32 | # Create a training dataset with examples | STRING |
| MEDIUM | dspy/teleprompt/utils.py | 39 | # Create the mini-batch using the sampled indices | COMMENT |
| MEDIUM | dspy/teleprompt/utils.py | 220 | # Define the save path for the program | COMMENT |
| MEDIUM⚡ | dspy/teleprompt/utils.py | 248 | # Create a logger | COMMENT |
| MEDIUM⚡ | dspy/teleprompt/utils.py | 252 | # Create a file handler that logs debug and higher level messages | COMMENT |
| MEDIUM⚡ | dspy/teleprompt/utils.py | 259 | # Create a console handler with a higher log level | COMMENT |
| MEDIUM | dspy/teleprompt/mipro_optimizer_v2.py | 548 | # Initialize optimization variables | COMMENT |
| MEDIUM | dspy/teleprompt/mipro_optimizer_v2.py | 556 | # Define the objective function | COMMENT |
| MEDIUM | dspy/teleprompt/mipro_optimizer_v2.py | 568 | # Create a new candidate program | COMMENT |
| MEDIUM | dspy/teleprompt/gepa/instruction_proposal.py | 82 | # Create a rich multimodal examples_with_feedback that includes both text and images | COMMENT |
| MEDIUM⚡ | tests/clients/test_cache.py | 244 | # Define a test function | COMMENT |
| MEDIUM⚡ | tests/clients/test_cache.py | 301 | # Define a test function | COMMENT |
| MEDIUM⚡ | tests/clients/test_cache.py | 328 | # Define a test function | COMMENT |
| MEDIUM | tests/clients/test_cache.py | 215 | # Create a new cache instance with disk cache disabled | COMMENT |
| MEDIUM | tests/clients/test_cache.py | 271 | # Define a test function | COMMENT |
| MEDIUM | tests/test_utils/server/__init__.py | 24 | # Create a server log file used to store request logs | COMMENT |
| MEDIUM | tests/signatures/test_adapter_image.py | 346 | # Create a dspy.Image object from the PDF URL with download=True | COMMENT |
| MEDIUM | tests/signatures/test_adapter_image.py | 424 | # Create a dspy.Image from the file | COMMENT |
| MEDIUM | tests/utils/test_saving.py | 96 | # Create a custom handler to capture log messages | COMMENT |
| MEDIUM | tests/utils/test_settings.py | 127 | # Define the coroutines to be run | COMMENT |
| MEDIUM | tests/utils/test_settings.py | 225 | # Create a temporary Python file with our custom module | COMMENT |
| MEDIUM⚡ | tests/primitives/test_python_interpreter.py | 856 | # Create a string just over the threshold | COMMENT |
| MEDIUM⚡ | tests/primitives/test_python_interpreter.py | 868 | # Create a string with recognizable pattern just over threshold | COMMENT |
| MEDIUM | tests/primitives/test_base_module.py | 135 | # Create a temporary Python file with our custom module | COMMENT |
| MEDIUM | tests/primitives/test_base_module.py | 202 | # Create a custom handler to capture log messages | STRING |
| MEDIUM⚡ | tests/predict/test_rlm.py | 644 | # Create a field with description and constraints | COMMENT |
| MEDIUM | tests/predict/test_predict.py | 607 | # Define a model for datetime inputs and outputs | COMMENT |
| MEDIUM | tests/predict/test_predict.py | 1764 | # Create an instance of the Query model | COMMENT |
| MEDIUM | tests/predict/test_react.py | 215 | # Create a simple tool for testing | COMMENT |
| MEDIUM | tests/reliability/generate/utils.py | 297 | # Create a GeneratedTestCase object and add it to the list | COMMENT |
| MEDIUM | tests/teleprompt/test_copro_optimizer.py | 7 | # Define a simple metric function for testing | COMMENT |
| 7 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | dspy/propose/dataset_summary_generator.py | 82 | except Exception as e: | CODE |
| LOW | dspy/propose/grounded_proposer.py | 222 | except Exception as e: | CODE |
| MEDIUM | dspy/propose/grounded_proposer.py | 224 | print(f"Error getting program description. Running without program aware proposer. Error: {e}") | CODE |
| LOW | dspy/propose/grounded_proposer.py | 289 | except Exception as e: | CODE |
| MEDIUM | dspy/propose/grounded_proposer.py | 290 | print(f"Error getting source code: {e}.\n\nRunning without program aware proposer.") | CODE |
| LOW⚡ | dspy/propose/grounded_proposer.py | 301 | except Exception as e: | CODE |
| MEDIUM⚡ | dspy/propose/grounded_proposer.py | 302 | print(f"Error getting data summary: {e}.\n\nRunning without data aware proposer.") | CODE |
| LOW | dspy/clients/base_lm.py | 853 | except Exception: | CODE |
| LOW | dspy/clients/disk_serialization.py | 64 | except Exception as e: | CODE |
| LOW | dspy/clients/lm_local.py | 222 | except Exception: | CODE |
| MEDIUM | dspy/clients/lm_local.py | 200 | def train_sft_locally(model_name, train_data, train_kwargs): | CODE |
| LOW | dspy/clients/cache.py | 121 | except Exception: | CODE |
| LOW | dspy/clients/cache.py | 172 | except Exception: | CODE |
| LOW | dspy/clients/cache.py | 183 | except Exception as e: | CODE |
| LOW | dspy/clients/__init__.py | 71 | except Exception as e: | CODE |
| LOW⚡ | dspy/clients/openai.py | 109 | except Exception: | CODE |
| LOW⚡ | dspy/clients/openai.py | 119 | except Exception: | CODE |
| LOW | dspy/clients/lm.py | 257 | except Exception as e: | CODE |
| LOW | dspy/clients/lm.py | 315 | except Exception as e: | CODE |
| LOW | dspy/clients/lm.py | 394 | except Exception as err: | CODE |
| LOW | dspy/clients/databricks.py | 159 | except Exception: | CODE |
| LOW | dspy/clients/databricks.py | 259 | except Exception as e: | CODE |
| LOW⚡ | dspy/clients/databricks.py | 289 | except Exception: | CODE |
| LOW⚡ | dspy/clients/databricks.py | 298 | except Exception: | CODE |
| MEDIUM | dspy/clients/databricks.py | 263 | def _get_workspace_client() -> "WorkspaceClient": | CODE |
| LOW⚡ | dspy/clients/openai_format.py | 653 | except Exception as error: | CODE |
| LOW⚡ | dspy/clients/openai_format.py | 668 | except Exception as error: | CODE |
| LOW⚡ | dspy/clients/openai_format.py | 699 | except Exception: | CODE |
| LOW⚡ | dspy/clients/openai_format.py | 790 | except Exception: | CODE |
| LOW | dspy/utils/callback.py | 271 | except Exception as e: | CODE |
| LOW | dspy/utils/callback.py | 283 | except Exception as e: | CODE |
| LOW | dspy/utils/callback.py | 311 | except Exception as e: | CODE |
| LOW | dspy/utils/callback.py | 341 | except Exception as e: | CODE |
| LOW | dspy/utils/magicattr.py | 25 | except Exception as ex: | CODE |
| LOW | dspy/utils/parallelizer.py | 60 | except Exception as e: | CODE |
| LOW | dspy/utils/parallelizer.py | 191 | except Exception: | CODE |
| LOW | dspy/utils/langchain_tool.py | 26 | except Exception as e: | CODE |
| MEDIUM | dspy/utils/langchain_tool.py | 22 | def func(**kwargs): | CODE |
| LOW | dspy/utils/lazy_import.py | 113 | except Exception: | CODE |
| LOW | dspy/utils/unbatchify.py | 47 | except Exception as e: | CODE |
| LOW | dspy/utils/unbatchify.py | 72 | except Exception as e: | CODE |
| LOW | dspy/streaming/streaming_listener.py | 161 | except Exception: | CODE |
| LOW | dspy/streaming/streaming_listener.py | 369 | except Exception: | CODE |
| MEDIUM | dspy/streaming/streaming_listener.py | 366 | def _output_type(self) -> type | None: | CODE |
| LOW | dspy/primitives/python_interpreter.py | 285 | except Exception: | CODE |
| LOW | dspy/primitives/python_interpreter.py | 394 | except Exception as e: | CODE |
| LOW⚡ | dspy/primitives/base_module.py | 120 | except Exception: | CODE |
| LOW⚡ | dspy/primitives/base_module.py | 133 | except Exception: | CODE |
| LOW⚡ | dspy/primitives/base_module.py | 141 | except Exception: | CODE |
| LOW | dspy/primitives/base_module.py | 222 | except Exception as e: | CODE |
| LOW | dspy/primitives/base_module.py | 238 | except Exception as e: | CODE |
| LOW | dspy/adapters/chat_adapter.py | 86 | except Exception as e: | CODE |
| LOW | dspy/adapters/chat_adapter.py | 106 | except Exception as e: | CODE |
| LOW | dspy/adapters/chat_adapter.py | 238 | except Exception as e: | CODE |
| LOW | dspy/adapters/xml_adapter.py | 111 | except Exception as e: | CODE |
| LOW⚡ | dspy/adapters/_legacy_type_markers.py | 86 | except Exception: | CODE |
| LOW | dspy/adapters/utils.py | 41 | except Exception: | CODE |
| LOW | dspy/adapters/utils.py | 196 | except Exception: | CODE |
| LOW | dspy/adapters/json_adapter.py | 89 | except Exception: | CODE |
| LOW | dspy/adapters/json_adapter.py | 116 | except Exception: | CODE |
| 60 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | dspy/adapters/base.py | 382 | # Begin few-shot examples | STRING |
| MEDIUM | dspy/adapters/base.py | 388 | # End few-shot examples | STRING |
| MEDIUM⚡ | dspy/predict/refine.py | 72 | # Define a QA module with chain of thought | STRING |
| MEDIUM⚡ | dspy/predict/best_of_n.py | 34 | # Define a QA module with chain of thought | STRING |
| MEDIUM⚡ | dspy/teleprompt/knn_fewshot.py | 29 | # Define a QA module with chain of thought | STRING |
| MEDIUM | dspy/teleprompt/knn_fewshot.py | 45 | # Compile the QA module with few-shot learning | STRING |
| MEDIUM | dspy/teleprompt/random_search.py | 74 | # zero-shot | COMMENT |
| MEDIUM | dspy/teleprompt/random_search.py | 83 | # unshuffled few-shot | COMMENT |
| MEDIUM | dspy/teleprompt/random_search.py | 157 | # Alternatively, we can keep track of the (zero-shot) number of tokens when we bootstrap. | COMMENT |
| MEDIUM | dspy/teleprompt/utils.py | 365 | # zero-shot | COMMENT |
| MEDIUM | dspy/teleprompt/utils.py | 378 | # unshuffled few-shot | COMMENT |
| MEDIUM | dspy/teleprompt/utils.py | 391 | # shuffled few-shot | COMMENT |
| MEDIUM | dspy/teleprompt/copro_optimizer.py | 149 | # Seed the prompt optimizer zero shot with just the instruction, generate BREADTH new prompts | COMMENT |
| MEDIUM⚡ | dspy/teleprompt/mipro_optimizer_v2.py | 230 | # Step 1: Bootstrap few-shot examples | COMMENT |
| MEDIUM⚡ | dspy/teleprompt/mipro_optimizer_v2.py | 256 | # If zero-shot, discard demos | COMMENT |
| MEDIUM⚡ | dspy/teleprompt/mipro_optimizer_v2.py | 309 | # Set num instruct candidates to 1/2 of N if optimizing with few-shot examples, otherwise set to N | COMMENT |
| MEDIUM⚡ | dspy/teleprompt/mipro_optimizer_v2.py | 310 | # This is because we've found that it's generally better to spend optimization budget on few-shot examples | COMMENT |
| MEDIUM⚡ | dspy/teleprompt/mipro_optimizer_v2.py | 283 | num_vars *= 2 # Account for few-shot examples + instruction variables | CODE |
| MEDIUM | dspy/teleprompt/mipro_optimizer_v2.py | 448 | # logger.info(f"!!!!\n\n\n\n\nError generating few-shot examples: {e}") | COMMENT |
| MEDIUM | dspy/teleprompt/mipro_optimizer_v2.py | 449 | # logger.info("Running without few-shot examples.!!!!\n\n\n\n\n") | COMMENT |
| MEDIUM | tests/adapters/test_json_adapter.py | 983 | # 1 system message, 2 few shot examples (1 user and assistant message for each example), 1 user message | COMMENT |
| MEDIUM | tests/adapters/test_json_adapter.py | 1076 | # Image information in the few-shot example's user message | COMMENT |
| MEDIUM | tests/adapters/test_chat_adapter.py | 2128 | # 1 system message, 2 few shot examples (1 user and assistant message for each example), 1 user message | COMMENT |
| MEDIUM | tests/adapters/test_chat_adapter.py | 2193 | # Image information in the few-shot example's user message | COMMENT |
| MEDIUM | tests/adapters/test_xml_adapter.py | 214 | # Image information in the few-shot example's user message | STRING |
| MEDIUM | tests/predict/test_react.py | 237 | # The 3rd call raises context window exceeded error | COMMENT |
| MEDIUM⚡ | tests/examples/test_baleen.py | 62 | # Ask any question you like to this simple RAG program. | COMMENT |
| MEDIUM⚡ | tests/examples/test_baleen.py | 66 | uncompiled_baleen = SimplifiedBaleen() # uncompiled (i.e., zero-shot) program | CODE |
| MEDIUM | tests/examples/test_baleen.py | 103 | uncompiled_baleen = SimplifiedBaleen() # uncompiled (i.e., zero-shot) program | CODE |
| MEDIUM | tests/teleprompt/test_utils.py | 84 | # Find the call where seed == -1 (unshuffled few-shot) | COMMENT |
| MEDIUM | docs/overrides/home.html | 337 | <div class="line"><span class="tok-cm"># Baseline 62% (gpt-5.4-mini, zero-shot)</span></div> | CODE |
| MEDIUM | docs/docs/getting-started/react-and-tools.md | 72 | ## ReAct manages an agentic loop | COMMENT |
| MEDIUM | docs/docs/api/optimizers/GEPA/GEPA_Advanced.md | 173 | #### Advanced Example: RAG-Enhanced Instruction Proposer | COMMENT |
| MEDIUM⚡ | docs/docs/tutorials/build_ai_program/index.md | 16 | ## Retrieval-Augmented Generation (RAG) | COMMENT |
| MEDIUM⚡ | docs/docs/tutorials/build_ai_program/index.md | 18 | ### [Retrieval-Augmented Generation (RAG)](../rag/index.ipynb) | COMMENT |
| MEDIUM⚡ | docs/docs/tutorials/build_ai_program/index.md | 21 | ### [Building RAG as Agent](../agents/index.ipynb) | COMMENT |
| MEDIUM⚡ | docs/docs/tutorials/build_ai_program/index.md | 24 | ### [Multi-Hop RAG](../multihop_search/index.ipynb) | COMMENT |
| MEDIUM | docs/docs/community/community-resources.md | 24 | | **Building Self-improving Agents in Production with DSPy** | [Link](https://relevanceai.com/blog/building-self-improvi | CODE |
| MEDIUM | docs/docs/community/use-cases.md | 60 | | **[Moody's](https://www.moodys.com/)** | Leveraging DSPy to optimize RAG systems, LLM-as-a-Judge, and agentic systems | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | dspy/signatures/signature.py | 830 | # Step 1: Convert camelCase to snake_case | COMMENT |
| LOW⚡ | dspy/signatures/signature.py | 838 | # Step 2: Handle numbers by adding underscores around them | COMMENT |
| LOW | dspy/signatures/signature.py | 852 | # Step 3: Convert to Title Case while preserving acronyms | COMMENT |
| LOW⚡ | dspy/teleprompt/mipro_optimizer_v2.py | 230 | # Step 1: Bootstrap few-shot examples | COMMENT |
| LOW⚡ | dspy/teleprompt/mipro_optimizer_v2.py | 261 | # Step 3: Find optimal prompt parameters | COMMENT |
| LOW | dspy/teleprompt/mipro_optimizer_v2.py | 243 | # Step 2: Propose instruction candidates | COMMENT |
| LOW⚡ | docs/docs/api/modules/RLM.md | 64 | ##### Step 1: Initial Metadata (no direct access to full context) | COMMENT |
| LOW⚡ | docs/docs/api/modules/RLM.md | 66 | # Step 1: Peek at the data | COMMENT |
| LOW⚡ | docs/docs/api/modules/RLM.md | 74 | ##### Step 2: Write Code to Explore Context | COMMENT |
| LOW⚡ | docs/docs/api/modules/RLM.md | 76 | # Step 2: Search for relevant sections | COMMENT |
| LOW⚡ | docs/docs/api/modules/RLM.md | 86 | ##### Step 3: Trigger Sub-LLM Calls | COMMENT |
| LOW⚡ | docs/docs/api/modules/RLM.md | 88 | # Step 3: Use sub-LLM for semantic extraction | COMMENT |
| LOW⚡ | docs/docs/api/modules/RLM.md | 97 | ##### Step 4: Submit Final Answer | COMMENT |
| LOW⚡ | docs/docs/api/modules/RLM.md | 99 | # Step 4: Return final answer | COMMENT |
| LOW | docs/docs/tutorials/mem0_react_agent/index.md | 27 | ## Step 1: Understanding Mem0 Integration | COMMENT |
| LOW | docs/docs/tutorials/mem0_react_agent/index.md | 59 | ## Step 2: Create Memory-Aware Tools | COMMENT |
| LOW⚡ | docs/docs/tutorials/mem0_react_agent/index.md | 129 | ## Step 3: Build the Memory-Enhanced ReAct Agent | COMMENT |
| LOW | docs/docs/tutorials/mem0_react_agent/index.md | 198 | ## Step 4: Running the Memory-Enhanced Agent | COMMENT |
| LOW | docs/docs/tutorials/sample_code_generation/index.md | 21 | ## Step 1: Documentation Fetching and Processing | COMMENT |
| LOW | docs/docs/tutorials/sample_code_generation/index.md | 198 | ## Step 2: Learning from Documentation URLs | STRING |
| LOW | docs/docs/tutorials/sample_code_generation/index.md | 243 | ## Step 3: Generating Code Examples | COMMENT |
| LOW | docs/docs/tutorials/sample_code_generation/index.md | 318 | ## Step 4: Interactive Library Learning Function | COMMENT |
| LOW | docs/docs/tutorials/sample_code_generation/index.md | 335 | # Step 1: Learn from documentation | COMMENT |
| LOW | docs/docs/tutorials/sample_code_generation/index.md | 338 | # Step 2: Generate examples for each use case | COMMENT |
| LOW⚡ | docs/docs/tutorials/optimizer_tracking/index.md | 104 | #### Step 1: Access the MLflow UI | COMMENT |
| LOW⚡ | docs/docs/tutorials/optimizer_tracking/index.md | 107 | #### Step 2: Understanding the Experiment Structure | COMMENT |
| LOW⚡ | docs/docs/tutorials/optimizer_tracking/index.md | 112 | #### Step 3: Analyzing the Parent Run | COMMENT |
| LOW⚡ | docs/docs/tutorials/optimizer_tracking/index.md | 117 | #### Step 4: Examining Child Runs | COMMENT |
| LOW | docs/docs/tutorials/email_extraction/index.md | 64 | ## Step 1: Define Our Data Structures | COMMENT |
| LOW | docs/docs/tutorials/email_extraction/index.md | 97 | ## Step 2: Create DSPy Signatures | COMMENT |
| LOW | docs/docs/tutorials/email_extraction/index.md | 147 | ## Step 3: Build the Email Processing Module | COMMENT |
| LOW⚡ | docs/docs/tutorials/email_extraction/index.md | 167 | # Step 1: Classify the email | COMMENT |
| LOW⚡ | docs/docs/tutorials/email_extraction/index.md | 174 | # Step 2: Extract entities | COMMENT |
| LOW⚡ | docs/docs/tutorials/email_extraction/index.md | 181 | # Step 3: Generate summary | COMMENT |
| LOW⚡ | docs/docs/tutorials/email_extraction/index.md | 188 | # Step 4: Determine actions | COMMENT |
| LOW⚡ | docs/docs/tutorials/email_extraction/index.md | 196 | # Step 5: Structure the results | COMMENT |
| LOW | docs/docs/tutorials/email_extraction/index.md | 213 | ## Step 4: Running the Email Processing System | COMMENT |
| LOW | docs/docs/tutorials/ai_text_game/index.md | 21 | ## Step 1: Core Game Framework | COMMENT |
| LOW | docs/docs/tutorials/ai_text_game/index.md | 168 | ## Step 2: AI-Powered Story Generation | COMMENT |
| LOW | docs/docs/tutorials/ai_text_game/index.md | 297 | ## Step 3: Game Interface and Interaction | COMMENT |
| LOW | docs/docs/tutorials/ai_text_game/index.md | 405 | ## Step 4: Main Game Loop | STRING |
| LOW | docs/docs/tutorials/yahoo_finance_react/index.md | 15 | ## Step 1: Convert LangChain Tool to DSPy | COMMENT |
| LOW | docs/docs/tutorials/yahoo_finance_react/index.md | 33 | ## Step 2: Create Supporting Financial Tools | COMMENT |
| LOW | docs/docs/tutorials/yahoo_finance_react/index.md | 88 | ## Step 3: Build the Financial ReAct Agent | COMMENT |
| LOW | docs/docs/tutorials/yahoo_finance_react/index.md | 115 | ## Step 4: Run Financial Analysis | COMMENT |
| LOW | docs/docs/tutorials/llms_txt_generation/index.md | 19 | ### Step 1: Define Our Signatures | COMMENT |
| LOW | docs/docs/tutorials/llms_txt_generation/index.md | 59 | ### Step 2: Create the Repository Analyzer Module | COMMENT |
| LOW | docs/docs/tutorials/llms_txt_generation/index.md | 107 | ### Step 3: Gather Repository Information | COMMENT |
| LOW | docs/docs/tutorials/llms_txt_generation/index.md | 173 | ### Step 4: Configure DSPy and Generate llms.txt | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | dspy/propose/dataset_summary_generator.py | 48 | CODE | |
| LOW | dspy/propose/utils.py | 146 | CODE | |
| LOW | dspy/propose/grounded_proposer.py | 144 | CODE | |
| LOW | dspy/propose/grounded_proposer.py | 306 | CODE | |
| LOW | dspy/propose/grounded_proposer.py | 155 | CODE | |
| LOW | dspy/clients/base_lm.py | 856 | CODE | |
| LOW | dspy/clients/cache.py | 24 | CODE | |
| LOW | dspy/clients/cache.py | 48 | CODE | |
| LOW | dspy/clients/lm.py | 620 | CODE | |
| LOW | dspy/clients/databricks.py | 305 | CODE | |
| LOW | dspy/clients/databricks.py | 51 | CODE | |
| LOW | dspy/clients/openai_format.py | 577 | CODE | |
| LOW | dspy/clients/openai_format.py | 776 | CODE | |
| LOW | dspy/retrievers/weaviate_rm.py | 73 | CODE | |
| LOW | dspy/retrievers/weaviate_rm.py | 113 | CODE | |
| LOW | dspy/core/types.py | 1576 | CODE | |
| LOW | dspy/core/types.py | 1635 | CODE | |
| LOW | dspy/core/types.py | 1791 | CODE | |
| LOW | dspy/core/types.py | 259 | CODE | |
| LOW | dspy/core/types.py | 1182 | CODE | |
| LOW | dspy/signatures/signature.py | 54 | CODE | |
| LOW | dspy/signatures/signature.py | 138 | CODE | |
| LOW | dspy/datasets/hotpotqa.py | 7 | CODE | |
| LOW | dspy/datasets/math.py | 36 | CODE | |
| LOW | dspy/datasets/alfworld/alfworld.py | 6 | CODE | |
| LOW | dspy/utils/annotation.py | 39 | CODE | |
| LOW | dspy/utils/magicattr.py | 117 | CODE | |
| LOW | dspy/utils/parallelizer.py | 105 | CODE | |
| LOW | dspy/utils/inspect_history.py | 27 | CODE | |
| LOW | dspy/utils/unbatchify.py | 51 | CODE | |
| LOW | dspy/streaming/streaming_listener.py | 241 | CODE | |
| LOW | dspy/streaming/streaming_listener.py | 312 | CODE | |
| LOW | dspy/streaming/streamify.py | 31 | CODE | |
| LOW | dspy/streaming/streamify.py | 179 | CODE | |
| LOW | dspy/primitives/example.py | 324 | CODE | |
| LOW | dspy/primitives/example.py | 335 | CODE | |
| LOW | dspy/primitives/python_interpreter.py | 502 | CODE | |
| LOW | dspy/primitives/python_interpreter.py | 545 | CODE | |
| LOW | dspy/primitives/base_module.py | 23 | CODE | |
| LOW | dspy/primitives/base_module.py | 69 | CODE | |
| LOW | dspy/primitives/base_module.py | 110 | CODE | |
| LOW | dspy/primitives/base_module.py | 34 | CODE | |
| LOW | dspy/adapters/utils.py | 93 | CODE | |
| LOW | dspy/adapters/json_adapter.py | 231 | CODE | |
| LOW | dspy/adapters/json_adapter.py | 275 | CODE | |
| LOW | dspy/adapters/base.py | 137 | CODE | |
| LOW | dspy/adapters/base.py | 280 | CODE | |
| LOW | dspy/adapters/base.py | 625 | CODE | |
| LOW | dspy/adapters/baml_adapter.py | 89 | CODE | |
| LOW | dspy/adapters/types/base_type.py | 135 | CODE | |
| LOW | dspy/adapters/types/citation.py | 133 | CODE | |
| LOW | dspy/adapters/types/citation.py | 182 | CODE | |
| LOW | dspy/adapters/types/audio.py | 125 | CODE | |
| LOW | dspy/adapters/types/tool.py | 392 | CODE | |
| LOW | dspy/adapters/types/tool.py | 284 | CODE | |
| LOW | dspy/adapters/types/image.py | 128 | CODE | |
| LOW | dspy/adapters/types/image.py | 239 | CODE | |
| LOW | dspy/predict/predict.py | 398 | CODE | |
| LOW | dspy/predict/predict.py | 141 | CODE | |
| LOW | dspy/predict/refine.py | 98 | CODE | |
| 37 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | dspy/propose/__init__.py | 3 | __all__ = [ | CODE |
| LOW | dspy/clients/lm_local.py | 19 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/clients/cache.py | 21 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/clients/__init__.py | 13 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/clients/__init__.py | 113 | __all__ = [ | CODE |
| LOW | dspy/clients/lm.py | 40 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/clients/databricks.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/clients/openai_format.py | 54 | __all__ = [ | CODE |
| LOW | dspy/experimental/__init__.py | 4 | __all__ = [ | CODE |
| LOW | dspy/retrievers/__init__.py | 4 | __all__ = ["Embeddings", "EmbeddingsWithScores", "Retrieve"] | CODE |
| LOW | dspy/core/types.py | 17 | __all__ = [ | CODE |
| LOW | dspy/signatures/__init__.py | 10 | __all__ = [ | CODE |
| LOW | dspy/datasets/__init__.py | 8 | __all__ = [ | CODE |
| LOW | dspy/utils/callback.py | 12 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/utils/parallelizer.py | 13 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/utils/saving.py | 12 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/utils/__init__.py | 26 | __all__ = [ | CODE |
| LOW | dspy/streaming/__init__.py | 5 | __all__ = [ | CODE |
| LOW | dspy/streaming/streamify.py | 19 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/primitives/repl_types.py | 23 | __all__ = ["REPLVariable", "REPLEntry", "REPLHistory"] | CODE |
| LOW | dspy/primitives/__init__.py | 9 | __all__ = [ | CODE |
| LOW⚡ | dspy/primitives/python_interpreter.py | 27 | __all__ = ["PythonInterpreter", "FinalOutput", "CodeExecutionError", "CodeInterpreterError"] | CODE |
| LOW⚡ | dspy/primitives/python_interpreter.py | 29 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/primitives/base_module.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/primitives/module.py | 15 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/primitives/sandbox_serializable.py | 38 | __all__ = ["SandboxSerializable", "build_repl_variable"] | CODE |
| LOW | dspy/adapters/__init__.py | 8 | __all__ = [ | CODE |
| LOW | dspy/adapters/json_adapter.py | 24 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/adapters/base.py | 28 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/adapters/types/__init__.py | 10 | __all__ = ["History", "Image", "Audio", "File", "Type", "Tool", "ToolCalls", "ToolCallResults", "Code", "Reasoning"] | CODE |
| LOW | dspy/evaluate/__init__.py | 5 | __all__ = [ | CODE |
| LOW | dspy/evaluate/evaluate.py | 45 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/predict/rlm.py | 49 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/predict/react.py | 10 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/predict/predict.py | 19 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/predict/__init__.py | 15 | __all__ = [ | CODE |
| LOW | dspy/predict/react_v2.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/predict/code_act.py | 13 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/predict/program_of_thought.py | 20 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/teleprompt/bootstrap_trace.py | 13 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/teleprompt/bootstrap.py | 33 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/teleprompt/bettertogether.py | 22 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/teleprompt/__init__.py | 19 | __all__ = [ | CODE |
| LOW | dspy/teleprompt/grpo.py | 23 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/teleprompt/utils.py | 24 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/teleprompt/bootstrap_finetune.py | 17 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/teleprompt/copro_optimizer.py | 10 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/teleprompt/simba.py | 14 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/teleprompt/mipro_optimizer_v2.py | 25 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/teleprompt/simba_utils.py | 12 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/teleprompt/infer_rules.py | 9 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/teleprompt/gepa/gepa.py | 18 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/teleprompt/gepa/__init__.py | 3 | __all__ = ["GEPA"] | CODE |
| LOW | dspy/teleprompt/gepa/instruction_proposal.py | 10 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/teleprompt/gepa/gepa_utils.py | 17 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/dsp/utils/settings.py | 13 | logger = logging.getLogger(__name__) | CODE |
| LOW | dspy/dsp/utils/dpr.py | 13 | logger = logging.getLogger(__name__) | CODE |
| LOW | tests/mock_interpreter.py | 15 | __all__ = ["MockInterpreter", "MockInterpreterFactory"] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | dspy/teleprompt/bootstrap.py | 121 | assert predictor1.signature.equals( | CODE |
| HIGH | dspy/teleprompt/gepa/gepa_utils.py | 224 | trace_instances = [t for t in trace if t[0].signature.equals(module.signature)] | STRING |
| HIGH⚡ | tests/signatures/test_signature.py | 146 | assert sig1.equals(sig2) | CODE |
| HIGH⚡ | tests/signatures/test_signature.py | 152 | assert not sig1.equals(sig2) | CODE |
| HIGH⚡ | tests/signatures/test_signature.py | 160 | assert TestSignature.equals(TestSignature) | CODE |
| HIGH | tests/signatures/test_signature.py | 515 | assert sig1.equals(sig2) | CODE |
| HIGH | tests/signatures/test_signature.py | 557 | assert Sig1.equals(Sig2) | CODE |
| HIGH | tests/adapters/test_chat_adapter.py | 796 | '{"type": "null"}], "default": null, "title": "Document Title"}, "end_char_index": ' | CODE |
| HIGH | tests/adapters/test_chat_adapter.py | 799 | '"string"}, {"type": "null"}], "default": null, "title": "Supported Text"}}, ' | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | dspy/clients/provider.py | 35 | # Check if job is done | STRING |
| LOW | dspy/clients/openai.py | 141 | # Check if there is an active job | COMMENT |
| LOW | dspy/signatures/signature.py | 718 | # Check if it's a built-in known type or in the provided names | COMMENT |
| LOW | dspy/signatures/signature.py | 724 | # Check if it matches any known built-in type by name | COMMENT |
| LOW | dspy/primitives/module.py | 339 | # Check if forward is called through __call__ or directly | COMMENT |
| LOW | dspy/adapters/utils.py | 133 | # Check if the identifier is a valid enum member value *before* checking if it's a valid enum | COMMENT |
| LOW | dspy/adapters/base.py | 558 | # Check if all fields are present and not None | COMMENT |
| LOW | dspy/adapters/base.py | 561 | # Check if demo has at least one input and one output field | COMMENT |
| LOW | dspy/adapters/types/citation.py | 193 | # Check if the chunk has citation data in provider_specific_fields | COMMENT |
| LOW | dspy/adapters/types/citation.py | 215 | # Check if the response contains citations in the expected format | COMMENT |
| LOW | dspy/adapters/types/reasoning.py | 159 | # Check if this is a valid string method/attribute | COMMENT |
| LOW | dspy/adapters/types/tool.py | 101 | # Check if the type (or its origin) is a subclass of Pydantic's BaseModel | COMMENT |
| LOW | dspy/teleprompt/bettertogether.py | 579 | # Check if this is the best score so far | COMMENT |
| LOW | tests/docs/test_mkdocs_links.py | 9 | # Read file and extract nav section | COMMENT |
| LOW | tests/docs/test_mkdocs_links.py | 28 | # Check if files exist | COMMENT |
| LOW | tests/reliability/generate/utils.py | 278 | # Check if the directory contains a program.py and an inputs directory | COMMENT |
| LOW | tests/reliability/generate/utils.py | 684 | # Read the file contents | STRING |
| LOW | tests/teleprompt/test_copro_optimizer.py | 148 | # Check if the results_best and results_latest contain valid statistics | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | docs/docs/tutorials/async/index.md | 60 | os.environ["OPENAI_API_KEY"] = "your_api_key" | CODE |
| HIGH | docs/docs/tutorials/async/index.md | 85 | os.environ["OPENAI_API_KEY"] = "your_api_key" | CODE |
| HIGH | docs/docs/tutorials/async/index.md | 142 | os.environ["OPENAI_API_KEY"] = "your_api_key" | CODE |
| HIGH | docs/docs/tutorials/streaming/index.md | 23 | os.environ["OPENAI_API_KEY"] = "your_api_key" | CODE |
| HIGH | docs/docs/tutorials/streaming/index.md | 471 | os.environ["OPENAI_API_KEY"] = "your_api_key" | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | dspy/adapters/baml_adapter.py | 208 | # PatientDetails(name='John Doe', age=45, address=PatientAddress(street='123 Main St', city='Anytown', country='US') | STRING |
| LOW | dspy/adapters/baml_adapter.py | 208 | # PatientDetails(name='John Doe', age=45, address=PatientAddress(street='123 Main St', city='Anytown', country='US') | STRING |
| LOW | tests/datasets/test_dataset.py | 9 | dummy_data = """content,question,answer | CODE |
| LOW | tests/datasets/test_dataset.py | 34 | tmp_file.write(dummy_data) | STRING |
| LOW⚡ | tests/adapters/test_baml_adapter.py | 258 | name="John Doe", age=45, address=PatientAddress(street="123 Main St", city="Anytown", country="US") | CODE |
| LOW⚡ | tests/adapters/test_baml_adapter.py | 258 | name="John Doe", age=45, address=PatientAddress(street="123 Main St", city="Anytown", country="US") | CODE |
| LOW⚡ | tests/adapters/test_baml_adapter.py | 265 | assert '"name": "John Doe"' in user_message | CODE |
| LOW⚡ | tests/adapters/test_baml_adapter.py | 267 | assert '"street": "123 Main St"' in user_message | CODE |
| LOW⚡ | tests/adapters/test_baml_adapter.py | 281 | patient = PatientDetails(name="Jane Doe", age=30) | CODE |
| LOW⚡ | tests/adapters/test_baml_adapter.py | 287 | assert '"name": "Jane Doe"' in user_message | CODE |
| LOW⚡ | tests/adapters/test_baml_adapter.py | 525 | choices=[Choices(message=Message(content='{"patient": {"name": "John Doe", "age": 28}}'))], | CODE |
| LOW⚡ | tests/adapters/test_baml_adapter.py | 534 | assert result[0]["patient"].name == "John Doe" | CODE |
| LOW | tests/adapters/test_baml_adapter.py | 623 | user_profile = UserProfile(name="John Doe", email="john@example.com", age=30) | CODE |
| LOW | tests/adapters/test_baml_adapter.py | 635 | assert '"name": "John Doe"' in user_message | CODE |
| LOW⚡ | tests/adapters/test_tool.py | 344 | assert result["primary_address"]["street"] == "123 Main St" | CODE |
| LOW | tests/adapters/test_tool.py | 333 | Address(street="123 Main St", city="Test City", zip_code="12345", is_primary=True), | CODE |
| LOW | docs/docs/learn/programming/adapters.md | 194 | "scientists_involved": ["John Doe", "Jane Smith"], | CODE |
| 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 | CODE |
| 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 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | dspy/propose/grounded_proposer.py | 250 | CODE | |
| LOW | dspy/clients/lm.py | 62 | CODE | |
| LOW | dspy/retrievers/databricks_rm.py | 84 | CODE | |
| LOW | dspy/utils/exceptions.py | 24 | CODE | |
| LOW | dspy/primitives/python_interpreter.py | 147 | CODE | |
| LOW | dspy/evaluate/evaluate.py | 71 | CODE | |
| LOW | dspy/evaluate/evaluate.py | 117 | CODE | |
| LOW | dspy/predict/parallel.py | 10 | CODE | |
| LOW | dspy/teleprompt/bootstrap_trace.py | 30 | CODE | |
| LOW | dspy/teleprompt/bettertogether.py | 193 | CODE | |
| LOW | dspy/teleprompt/random_search.py | 28 | CODE | |
| LOW | dspy/teleprompt/grpo.py | 27 | CODE | |
| LOW | dspy/teleprompt/utils.py | 324 | CODE | |
| LOW | dspy/teleprompt/simba.py | 29 | CODE | |
| LOW | dspy/teleprompt/mipro_optimizer_v2.py | 61 | CODE | |
| LOW | dspy/teleprompt/mipro_optimizer_v2.py | 109 | CODE | |
| LOW | dspy/teleprompt/gepa/gepa.py | 336 | CODE | |
| LOW | dspy/teleprompt/gepa/gepa_utils.py | 78 | CODE | |
| LOW | dspy/dsp/utils/utils.py | 45 | CODE | |
| LOW | tests/predict/test_parallel.py | 156 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | dspy/predict/retry.py | 1 | # import copy | COMMENT |
| LOW | dspy/predict/retry.py | 21 | # prefix="Previous " + actual_prefix, | COMMENT |
| LOW | dspy/predict/retry.py | 41 | # # Convert the dict past_outputs={"answer": ...} to kwargs | COMMENT |
| LOW | dspy/predict/retry.py | 61 | # pred = self.forward(**kwargs) | COMMENT |
| LOW | dspy/teleprompt/grpo.py | 261 | COMMENT | |
| LOW | dspy/teleprompt/grpo.py | 521 | logger.warning(f"GRPOGroup has no diversity. This could be due to low temperature, or low number | COMMENT |
| LOW | dspy/teleprompt/bootstrap_finetune.py | 221 | # ) -> dict[str, Any]: | COMMENT |
| LOW | tests/predict/test_retry.py | 1 | # import functools | COMMENT |
| LOW | tests/predict/test_retry.py | 21 | # result = retry_module.forward( | COMMENT |
| LOW | tests/predict/test_retry.py | 41 | # print(f"SimpleModule got {result.answer=}") | COMMENT |
| LOW | tests/predict/test_retry.py | 61 | # # class AnswerQuestion(dspy.Signature): | COMMENT |
| LOW | tests/predict/test_retry.py | 81 | # # return result | COMMENT |
| LOW | tests/predict/test_predict.py | 241 | COMMENT | |
| LOW | tests/predict/test_predict.py | 261 | # content="¿Qué tal?", | COMMENT |
| LOW | tests/reliability/reliability_conf.yaml | 1 | adapter: chat | COMMENT |
| LOW | tests/reliability/reliability_conf.yaml | 21 | - model_name: "gpt-4-turbo" | COMMENT |
| LOW | tests/reliability/reliability_conf.yaml | 41 | - model_name: "claude-3.5-haiku" | COMMENT |
| LOW | tests/reliability/reliability_conf.yaml | 61 | - model_name: "llama-3.1-70b-instruct" | COMMENT |
| LOW | docs/docs/stylesheets/home.css | 601 | border-bottom-color: var(--hp-accent); | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/adapters/test_json_adapter.py | 0 | answer the question with multiple answers and scores | STRING |
| HIGH | tests/adapters/test_chat_adapter.py | 0 | answer the question with multiple answers and scores | STRING |
| HIGH | tests/adapters/test_xml_adapter.py | 0 | answer the question with multiple answers and scores | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| 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 | STRING |
| LOW | dspy/adapters/utils.py | 66 | # (e.g. the value is a JSON string), just use the string representation of the value | COMMENT |
| LOW | dspy/evaluate/evaluate.py | 38 | # available, this method will simply return the input string. | COMMENT |
| MEDIUM | dspy/teleprompt/gepa/instruction_proposal.py | 308 | # instead of just the current instruction, for more holistic instruction proposals. | COMMENT |
| MEDIUM | dspy/dsp/utils/settings.py | 153 | # We check its existence and type to be more robust. | COMMENT |
| LOW | tests/predict/test_rlm.py | 469 | # Unclosed fence (just return the body) | COMMENT |
| MEDIUM | tests/predict/test_rlm.py | 453 | """Tests for robust fenced-code extraction.""" | STRING |
| MEDIUM | tests/teleprompt/test_gepa_instruction_proposer.py | 158 | # Use a robust dummy LM with enough responses for optimization steps | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/clients/test_cache.py | 246 | def test_function(prompt, model): | CODE |
| LOW⚡ | tests/clients/test_cache.py | 303 | async def test_function(prompt, model): | CODE |
| LOW⚡ | tests/clients/test_cache.py | 330 | def test_function(**kwargs): | CODE |
| LOW⚡ | tests/utils/test_annotation.py | 6 | def test_function(): | CODE |
| LOW⚡ | tests/utils/test_annotation.py | 17 | def test_function(): | CODE |
| LOW⚡ | tests/utils/test_annotation.py | 55 | def test_function(): | CODE |
| LOW⚡ | tests/utils/test_annotation.py | 64 | def test_function(): | CODE |
| LOW⚡ | tests/utils/test_annotation.py | 72 | def test_function(): | CODE |
| LOW | tests/utils/test_annotation.py | 84 | def test_function(): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | dspy/signatures/signature.py | 830 | # Step 1: Convert camelCase to snake_case | COMMENT |
| LOW⚡ | dspy/signatures/signature.py | 838 | # Step 2: Handle numbers by adding underscores around them | COMMENT |
| LOW | dspy/signatures/signature.py | 852 | # Step 3: Convert to Title Case while preserving acronyms | COMMENT |
| LOW⚡ | dspy/teleprompt/mipro_optimizer_v2.py | 230 | # Step 1: Bootstrap few-shot examples | COMMENT |
| LOW⚡ | dspy/teleprompt/mipro_optimizer_v2.py | 261 | # Step 3: Find optimal prompt parameters | COMMENT |
| LOW | dspy/teleprompt/mipro_optimizer_v2.py | 243 | # Step 2: Propose instruction candidates | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | docs/docs/diving-deeper/adapters.md | 147 | **`dspy.adapters.types.tool.ToolCalls.from_dict_list(...)`** | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| 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 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | dspy/adapters/json_adapter.py | 227 | # TODO: implement format_finetune_data method in JSONAdapter | COMMENT |
| LOW | .github/workflows/build_and_release.yml | 81 | # TODO: Add tests using dspy-ai-test | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/clients/test_lm.py | 1778 | CODE |