[CAI-880][CAI-881] Fix chips tool calling#2200
Conversation
…follow-up questions tool description
… improve user query handling
… and CittadinoRAGTool
🦋 Changeset detectedLatest commit: 80d82b5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
There was a problem hiding this comment.
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
FollowUpQuestionsToolshould be called and when it should return empty output. - Simplify the Discovery agent
run()invocation by removingContext/early_stopping_methodarguments. - 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.
…e_questions return type
…llow-up questions output
Branch is not up to date with base branch@mdciri it seems this Pull Request is not updated with base branch. |
Jira Pull Request LinkThis Pull Request refers to the following Jira issue CAI-880 |
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
Checklist: