Skip to content

[CAI-880][CAI-881] Fix chips tool calling#2200

Merged
marcobottaro merged 9 commits intomainfrom
CAI-880-fix-chips-tool-calling
Mar 27, 2026
Merged

[CAI-880][CAI-881] Fix chips tool calling#2200
marcobottaro merged 9 commits intomainfrom
CAI-880-fix-chips-tool-calling

Conversation

@mdciri
Copy link
Copy Markdown
Collaborator

@mdciri mdciri commented Mar 26, 2026

List of Changes

Update the tool description and function to generate smart chips.
Update the react prompt in order to not have the list of reference twice in the final answer.

Motivation and Context

the smart chips should only be generated when both rag tools are used and they both return relevant information for the user's query.

How Has This Been Tested?

Locally in docker composer

Screenshots (if appropriate):

Types of changes

  • Chore (nothing changes by a user perspective)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Copilot AI review requested due to automatic review settings March 26, 2026 15:16
@mdciri mdciri requested review from a team and MarBert as code owners March 26, 2026 15:16
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 26, 2026

🦋 Changeset detected

Latest commit: 80d82b5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
chatbot Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the “smart chips” (follow-up questions) flow so chips are generated only when both DevPortal and Cittadino RAG contexts are available/relevant, and tightens system-prompt guidance around where references may appear.

Changes:

  • Add gating logic + stronger instructions for when FollowUpQuestionsTool should be called and when it should return empty output.
  • Simplify the Discovery agent run() invocation by removing Context/early_stopping_method arguments.
  • Update ReAct system prompt wording to reinforce that references must not be duplicated in the final answer text.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
apps/chatbot/src/modules/tools/chips_generator_tool.py Adds empty-output gating + tool/prompt guidance for follow-up question generation.
apps/chatbot/src/modules/chatbot.py Removes workflow Context usage and early_stopping_method from agent execution.
apps/chatbot/config/prompts.yaml Strengthens instruction wording about references only appearing in structured references.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown
Contributor

Branch is not up to date with base branch

@mdciri it seems this Pull Request is not updated with base branch.
Please proceed with a merge or rebase to solve this.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 27, 2026

Jira Pull Request Link

This Pull Request refers to the following Jira issue CAI-880

@marcobottaro marcobottaro merged commit 25b0340 into main Mar 27, 2026
12 checks passed
@marcobottaro marcobottaro deleted the CAI-880-fix-chips-tool-calling branch March 27, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants