You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf: Semantic Kernel and Prompt improvement (#415)
* Semantic Kernel and Prompt improvement
* update dependencies and Azure OpenAI model configurations
* fix: upgrade pip and setuptools before installing requirements
* update SQL query placeholder from %s to ? for compatibility
* update Azure OpenAI gpt4omini deployment type to globalstandard
---------
Co-authored-by: Harsh-Microsoft <v-hbangera@microsoft.com>
Use Investement column from Assets table as value always.
38
-
Assets table has snapshots of values by date. Do not add numbers across different dates for total values.
39
-
Do not use client name in filter.
40
-
Do not include assets values unless asked for.
41
-
Always use ClientId = {clientid} in the query filter.
42
-
Always return client name in the query.
43
-
Only return the generated sql query. do not return anything else'''
44
-
45
-
varfunctionAppCallTranscriptSystemPrompt = '''You are an assistant who provides wealth advisors with helpful information to prepare for client meetings.
46
-
You have access to the client’s meeting call transcripts.
47
-
You can use this information to answer questions about the clients'''
27
+
varfunctionAppSqlPrompt ='''Generate a valid T-SQL query to find {query} for tables and columns provided below:
Always use the Investment column from the Assets table as the value.
43
+
Assets table has snapshots of values by date. Do not add numbers across different dates for total values.
44
+
Do not use client name in filters.
45
+
Do not include assets values unless asked for.
46
+
ALWAYS use ClientId = {clientid} in the query filter.
47
+
ALWAYS select Client Name (Column: Client) in the query.
48
+
Query filters are IMPORTANT. Add filters like AssetType, AssetDate, etc. if needed.
49
+
If the result might return more than 100 rows, include TOP 100 to limit the row count.
50
+
Only return the generated SQL query. Do not return anything else.'''
51
+
52
+
varfunctionAppCallTranscriptSystemPrompt = '''You are an assistant who supports wealth advisors in preparing for client meetings.
53
+
You have access to the client’s past meeting call transcripts.
54
+
When answering questions, especially summary requests, provide a detailed and structured response that includes key topics, concerns, decisions, and trends.
55
+
If no data is available, state 'No relevant data found for previous meetings.'''
48
56
49
-
varfunctionAppStreamTextSystemPrompt = '''You are a helpful assistant to a wealth advisor.
50
-
Do not answer any questions not related to wealth advisors queries.
51
-
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.
52
-
Only use the client name returned from database in the response.
53
-
If you cannot answer the question, always return - I cannot answer this question from the data available. Please rephrase or add more details.
54
-
** Remove any client identifiers or ids or numbers or ClientId in the final response.'''
57
+
varfunctionAppStreamTextSystemPrompt = '''You are a helpful assistant to a Wealth Advisor.
58
+
The currently selected client's name is '{SelectedClientName}' (in any variation: ignoring punctuation, apostrophes, and case).
59
+
If the user mentions no name, assume they are asking about '{SelectedClientName}'.
60
+
If the user references a name that clearly differs from '{SelectedClientName}', 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.
61
+
If no data is found, respond with 'No data found for that client.' Remove any client identifiers from the final response.'''
0 commit comments