Skip to content

fix: Fix for cwyd combination gp bug #40268#2170

Open
NirajC-Microsoft wants to merge 2 commits intoAzure-Samples:devfrom
NirajC-Microsoft:dev
Open

fix: Fix for cwyd combination gp bug #40268#2170
NirajC-Microsoft wants to merge 2 commits intoAzure-Samples:devfrom
NirajC-Microsoft:dev

Conversation

@NirajC-Microsoft
Copy link
Copy Markdown
Contributor

Purpose

This pull request strengthens the enforcement of always using document search or question answering tools before responding to user queries in various orchestrator modules. The changes clarify that the system must not answer questions directly or decide a query is out of domain without first searching the relevant documents. This helps ensure that all responses are grounded in the available data sources.

Prompt and System Message Enforcement:

  • Updated the lang_chain_agent.py prompt to require that the Question Answering tool is always used first before answering any user question, and to never answer directly without using this tool.
  • Updated the open_ai_functions.py system message to require always calling the search_documents function first for any user question and never deciding a question is out of domain without searching.
  • Clarified that the response "The requested information is not available in the retrieved data..." should only be given after calling search_documents and finding no relevant information, rather than preemptively.
  • Updated the semantic_kernel.py system message to require always calling the search_documents function first for any user question, and never deciding a question is out of domain without searching.

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant