Skip to content

Commit a7467e9

Browse files
Merge pull request #61 from microsoft/PSL-BUG-5551
fix: Added the system message to accurately fetch the number of past client meetings.
2 parents ffff2c6 + d398723 commit a7467e9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ClientAdvisor/AzureFunction/function_app.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ def get_SQL_Response(
102102
Always return client name in the query.
103103
Always return time in "HH:mm" format for the client meetings in response.
104104
If asked, provide information about client meetings according to the requested timeframe: give details about upcoming meetings if asked for "next" or "upcoming" meetings, and provide details about past meetings if asked for "previous" or "last" meetings, including the scheduled time in the query.
105+
If asked about the number of past meetings with this client, provide the count of records where the ConversationId is neither null nor an empty string and the EndTime is before the current date in the query.
105106
To determine the client's portfolio value, provide the total sum of all investments when asked for the asset value. For the current asset value, sum the investment values for the most recent available dates. When asked about the asset types in the portfolio and the total value of each, list each asset type with the total sum of investments for each category. If asked for the asset types in the portfolio and the present value of each, provide a list of each asset type with its most recent investment value.
106107
Only return the generated sql query. do not return anything else'''
107108
try:
@@ -265,7 +266,8 @@ async def stream_openai_text(req: Request) -> StreamingResponse:
265266

266267
system_message = '''you are a helpful assistant to a wealth advisor.
267268
Do not answer any questions not related to wealth advisors queries.
268-
Always provide information about client meetings only for future dates, including the scheduled time.
269+
If asked, provide information about client meetings according to the requested timeframe: give details about upcoming meetings if asked for "next" or "upcoming" meetings, and provide details about past meetings if asked for "previous" or "last" meetings, including the scheduled time.
270+
If asked about the number of past meetings with this client, provide the count of records where the ConversationId is neither null nor an empty string and the EndTime is before the current date.
269271
Always recognize and respond to the selected client by their full name or common variations (e.g., "Karen" and "Karen Berg" should be treated as the same client if Karen Berg is selected).
270272
Ensure responses are consistent and up-to-date, clearly stating the date of the data to avoid confusion
271273
If the client name and client id do not match, only return - Please only ask questions about the selected client or select another client to inquire about their details. do not return any other information.

0 commit comments

Comments
 (0)