Skip to content

Output parser crashes on a top-level JSON array fallback #69

Description

@Aburke225

When the LLM returns a top-level JSON array instead of an object, output_parser.py calls .items() on the parsed value and raises AttributeError: 'list' object has no attribute 'items'. The fallback path should handle array responses.

The covering test is marked @pytest.mark.xfail referencing manifest id H-02 — remove the marker as part of the fix.

Relevant files:

  • rag/generator/output_parser.py
  • tests/unit/test_output_parser.py

Estimated effort: 2–4 hours

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomersragRetrieval & generationtier-1Starter difficulty

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions