Skip to content

Conversation

@nirvana6
Copy link

@nirvana6 nirvana6 commented May 4, 2025

fix the markdown link.

fix the markdown link.
@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2025

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request

rpings pushed a commit to rpings/openspg that referenced this pull request Nov 27, 2025
)

This commit addresses several issues identified during a code analysis, focusing on improving the robustness, error handling, and clarity of various components within the KAG solver.

The following changes have been made:

1.  **KAGIterativePlanner**:
    *   Corrected `is_static()` method to return `False`, aligning with its iterative behavior.

2.  **KAGRetrievedResponse**:
    *   Removed a misleading note about an f-string formatting error from the `to_string()` method's docstring, as the error was not present in the code.

3.  **KAGStaticPlanner**:
    *   Improved `finish_judger` error handling: If the LLM call to judge the answer fails, it now logs a warning and returns `False` (treating the answer as potentially bad) instead of defaulting to `True`.

4.  **ChunkRetrievedExecutor**:
    *   Clarified schema name: Changed the `name` field in its schema dictionary from "Retriever" to "ChunkRetriever" to better differentiate it from other retriever executors like `KagHybridExecutor`.

5.  **PyBasedMathExecutor**:
    *   Added a configurable timeout (defaulting to 5 seconds) to the `subprocess.run()` call within the `run_py_code` function. This prevents indefinite hangs from long-running or stuck Python scripts generated by the LLM. Includes handling for `subprocess.TimeoutExpired`.

6.  **DefaultStaticPlanningPrompt**:
    *   Enhanced `parse_response` method: Implemented more robust JSON decoding and structural validation for the LLM-generated DAG plan. It now raises more descriptive `ValueError` exceptions, including details of the malformed data, when `KeyError` or `TypeError` occurs during task creation from the DAG, aiding in debugging.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant