Skip to content

Expose a message metadata flag for system instructions #207

Description

@avishek0769

Summary:
Add a simple metadata flag to message history responses so the frontend can tell whether system instructions were used during answer generation.

Why:
The message pipeline in backend/controllers/chatMessage.controller.js builds different system instructions depending on vector and vectorless retrieval. The frontend has no structured way to know whether a response used documentation context or a plain general-answer fallback.

Files to change:

  • backend/controllers/chatMessage.controller.js

Acceptance criteria:

  • Message history responses include a boolean metadata field such as hasSystemInstructions.
  • No raw instruction text or private content is leaked.
  • Existing message rendering still works without changes.

Implementation notes:

  • Add the flag at the serialization layer rather than changing the stored database schema.
  • Keep it boolean so the frontend can use it easily.

Metadata

Metadata

Assignees

Labels

MediumThis is issue is not easy to solve but not hardbackendBackend issuesenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions