-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
We get the following example outputs from the LM and when it gets to the JSON parser it raises the AdapterParseError in the JSONAdapter class. There is no handling for when nested JSON objects are returned by the LM and it considers these failed outputs. This error is intermittent but hard to handle. Our current fix is just implementing retries when this exception is raised to try for a non nested response/output.
AdapterParseError: Adapter JSONAdapter failed to parse the LM response. LM Response: {"json_input": {"reasoning": "Placeholder reasoning text indicating general analysis.", "actors": ["EntityA"], "details": "Placeholder description about the scenario being analyzed."}}
Expected to find output fields in the LM response: [reasoning, actors, details]
Actual output fields parsed from the LM response: []
AdapterParseError: Adapter JSONAdapter failed to parse the LM response. LM Response: {"json": "{\n "reasoning": "Placeholder reasoning regarding potential interactions.",\n "actors": ["EntityB", "EntityC"],\n "details": "Placeholder explanation of possible behavior or activity."\n}\n</invoke>"}
Expected to find output fields in the LM response: [reasoning, actors, details]
Actual output fields parsed from the LM response: []
AdapterParseError: Adapter JSONAdapter failed to parse the LM response. LM Response: {"json_object": {"reasoning": "Placeholder reasoning referencing an internal process discussion.", "actors": ["EntityD", "EntityE"], "details": "Placeholder information about improving procedural operations."}}
Expected to find output fields in the LM response: [reasoning, actors, details]
Actual output fields parsed from the LM response: []
Steps to reproduce
Use the chainofthought module with output fields defined and keep triggering it until the LM returns a nested json object.
DSPy version
2.6.27
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working