Skip to content

[BUG]: rag_chain make inavalid conversation #111

@s-natsubori

Description

@s-natsubori

Version

2.3.0

Describe the bug.

Many LLMs require that message roles alternate in the order of (system)/user/assistant/user/assistant/...,
However, the messages generated by __rag_chain are structured as user (context) / user (query),
which does not satisfy this requirement.
As a result, errors occur when calling LLMs (for example, with Gemma3).

It would be helpful to adjust or correct the message sequence to alternate roles properly.

Minimum reproducible example

Relevant log output

Full env printout

Other/Misc.

No response

Code of Conduct

  • I agree to follow THIS PROJECT's Code of Conduct
  • I have searched the open bugs and have found no duplicates for this bug report

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions