Skip to content

Commit 4c4ebf0

Browse files
fix: Changed the prompt to accurately answer scheduling or time based meeting questions and Readme changes (#593)
* added misssing parameter and removed unused. (#589) * Changed the prompt to accurately answer scheduling or time based meeting questions (#590) --------- Co-authored-by: VishalS-Microsoft <[email protected]>
1 parent e599cb8 commit 4c4ebf0

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

docs/CustomizingAzdParameters.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ By default this template will use the environment name as the prefix to prevent
1818
| `AZURE_ENV_EMBEDDING_MODEL_NAME` | string | `text-embedding-ada-002` | Set the model name used for embeddings. |
1919
| `AZURE_ENV_EMBEDDING_MODEL_CAPACITY` | integer | `80` | Set the capacity for embedding model deployment. |
2020
| `AZURE_ENV_IMAGETAG` | string | `latest` | Set the image tag (allowed values: `latest`, `dev`, `hotfix`). |
21-
| `AZURE_ENV_OPENAI_LOCATION` | string | `eastus2` | Location of the Azure OpenAI resource. Choose from (allowed values: `swedencentral`, `australiaeast`). |
2221
| `AZURE_LOCATION` | string | `japaneast` | Sets the Azure region for resource deployment. |
2322
| `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID` | string | `<Existing Workspace Id>` | Reuses an existing Log Analytics Workspace instead of provisioning a new one. |
24-
| `RESOURCE_GROUP_NAME_FOUNDRY` | string | `<Existing AI Foundry Project>` | Reuses an existing AI Foundry Project instead of provisioning a new one. |
23+
| `AZURE_EXISTING_AI_PROJECT_RESOURCE_ID` | string | `<Existing AI Foundry Project Resource Id>` | Reuses an existing AI Foundry Project Resource Id instead of provisioning a new one. |
2524

2625
## How to Set a Parameter
2726
To customize any of the above values, run the following command **before** `azd up`:

docs/DeploymentGuide.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ When you start the deployment, most parameters will have **default values**, but
107107

108108
| **Setting** | **Description** | **Default value** |
109109
| ------------------------------------ | -------------------------------------------------------------------------------------------------- | ------------------------ |
110-
| **Azure OpenAI Location** | The region where Azure OpenAI deploys. Choose from `swedencentral`, `australiaeast`, etc. | `eastus2` |
111110
| **Environment Name** | A **3-20 character alphanumeric value** used to generate a unique ID to prefix the resources. | `azdtemp` |
112111
| **Cosmos Location** | A **less busy** region for **CosmosDB**, useful in case of availability constraints. | `eastus2` |
113112
| **Deployment Type** | Select from a drop-down list (`Standard`, `GlobalStandard`). | `GlobalStandard` |

infra/main.bicep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ var functionAppSqlPrompt = '''Generate a valid T-SQL query to find {query} for t
107107
ALWAYS use ClientId = {clientid} in the query filter.
108108
ALWAYS select Client Name (Column: Client) in the query.
109109
Query filters are IMPORTANT. Add filters like AssetType, AssetDate, etc. if needed.
110+
When answering scheduling or time-based meeting questions, always use the StartTime column from ClientMeetings table. Use correct logic to return the most recent past meeting (last/previous) or the nearest future meeting (next/upcoming), and ensure only StartTime column is used for meeting timing comparisons.
110111
Only return the generated SQL query. Do not return anything else.'''
111112

112113
var functionAppCallTranscriptSystemPrompt = '''You are an assistant who supports wealth advisors in preparing for client meetings.

infra/main.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"_generator": {
66
"name": "bicep",
77
"version": "0.36.1.42791",
8-
"templateHash": "539400033229136375"
8+
"templateHash": "2947534626644546773"
99
}
1010
},
1111
"parameters": {
@@ -362,7 +362,7 @@
362362
"uniqueId": "[toLower(uniqueString(parameters('environmentName'), subscription().id, variables('solutionLocation')))]",
363363
"solutionPrefix": "[format('ca{0}', padLeft(take(variables('uniqueId'), 12), 12, '0'))]",
364364
"abbrs": "[variables('$fxv#0')]",
365-
"functionAppSqlPrompt": "Generate a valid T-SQL query to find {query} for tables and columns provided below:\n 1. Table: Clients\n Columns: ClientId, Client, Email, Occupation, MaritalStatus, Dependents\n 2. Table: InvestmentGoals\n Columns: ClientId, InvestmentGoal\n 3. Table: Assets\n Columns: ClientId, AssetDate, Investment, ROI, Revenue, AssetType\n 4. Table: ClientSummaries\n Columns: ClientId, ClientSummary\n 5. Table: InvestmentGoalsDetails\n Columns: ClientId, InvestmentGoal, TargetAmount, Contribution\n 6. Table: Retirement\n Columns: ClientId, StatusDate, RetirementGoalProgress, EducationGoalProgress\n 7. Table: ClientMeetings\n Columns: ClientId, ConversationId, Title, StartTime, EndTime, Advisor, ClientEmail\n Always use the Investment column from the Assets table as the value.\n Assets table has snapshots of values by date. Do not add numbers across different dates for total values.\n Do not use client name in filters.\n Do not include assets values unless asked for.\n ALWAYS use ClientId = {clientid} in the query filter.\n ALWAYS select Client Name (Column: Client) in the query.\n Query filters are IMPORTANT. Add filters like AssetType, AssetDate, etc. if needed.\n Only return the generated SQL query. Do not return anything else.",
365+
"functionAppSqlPrompt": "Generate a valid T-SQL query to find {query} for tables and columns provided below:\n 1. Table: Clients\n Columns: ClientId, Client, Email, Occupation, MaritalStatus, Dependents\n 2. Table: InvestmentGoals\n Columns: ClientId, InvestmentGoal\n 3. Table: Assets\n Columns: ClientId, AssetDate, Investment, ROI, Revenue, AssetType\n 4. Table: ClientSummaries\n Columns: ClientId, ClientSummary\n 5. Table: InvestmentGoalsDetails\n Columns: ClientId, InvestmentGoal, TargetAmount, Contribution\n 6. Table: Retirement\n Columns: ClientId, StatusDate, RetirementGoalProgress, EducationGoalProgress\n 7. Table: ClientMeetings\n Columns: ClientId, ConversationId, Title, StartTime, EndTime, Advisor, ClientEmail\n Always use the Investment column from the Assets table as the value.\n Assets table has snapshots of values by date. Do not add numbers across different dates for total values.\n Do not use client name in filters.\n Do not include assets values unless asked for.\n ALWAYS use ClientId = {clientid} in the query filter.\n ALWAYS select Client Name (Column: Client) in the query.\n Query filters are IMPORTANT. Add filters like AssetType, AssetDate, etc. if needed.\n When answering scheduling or time-based meeting questions, always use the StartTime column from ClientMeetings table. Use correct logic to return the most recent past meeting (last/previous) or the nearest future meeting (next/upcoming), and ensure only StartTime column is used for meeting timing comparisons.\n Only return the generated SQL query. Do not return anything else.",
366366
"functionAppCallTranscriptSystemPrompt": "You are an assistant who supports wealth advisors in preparing for client meetings. \n You have access to the client’s past meeting call transcripts. \n When answering questions, especially summary requests, provide a detailed and structured response that includes key topics, concerns, decisions, and trends. \n If no data is available, state 'No relevant data found for previous meetings.",
367367
"functionAppStreamTextSystemPrompt": "The currently selected client's name is '{SelectedClientName}'. Treat any case-insensitive or partial mention as referring to this client.\n If the user mentions no name, assume they are asking about '{SelectedClientName}'.\n If the user references a name that clearly differs from '{SelectedClientName}' or comparing with other clients, respond only with: 'Please only ask questions about the selected client or select another client.' Otherwise, provide thorough answers for every question using only data from SQL or call transcripts.'\n If no data is found, respond with 'No data found for that client.' Remove any client identifiers from the final response.\n Always send clientId as '{client_id}'."
368368
},

src/App/backend/plugins/chat_with_data_plugin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ async def get_SQL_Response(
110110
ALWAYS use ClientId = {clientid} in the query filter.
111111
ALWAYS select Client Name (Column: Client) in the query.
112112
Query filters are IMPORTANT. Add filters like AssetType, AssetDate, etc. if needed.
113+
When answering scheduling or time-based meeting questions, always use the StartTime column from ClientMeetings table. Use correct logic to return the most recent past meeting (last/previous) or the nearest future meeting (next/upcoming), and ensure only StartTime column is used for meeting timing comparisons.
113114
Only return the generated SQL query. Do not return anything else."""
114115

115116
try:

0 commit comments

Comments
 (0)