Skip to content

Commit 9524b24

Browse files
The total asset value and current asset value are responding correctly, and the total value matches the asset value displayed in the left panel.
1 parent 7232d77 commit 9524b24

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

infra/main.bicep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ var functionAppSqlPrompt = '''Generate a valid T-SQL query to find {query} for t
158158
ALWAYS select Client Name (Column: Client) in the query.
159159
Query filters are IMPORTANT. Add filters like AssetType, AssetDate, etc. if needed.
160160
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.
161+
For asset values: if question is about total \"asset value\"/\"portfolio value\"/\"AUM\" → return SUM of latest investments; if about \"current asset/investment value\" → return all latest investments without SUM.
161162
Only return the generated SQL query. Do not return anything else.'''
162163

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

src/App/backend/agents/agent_factory.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ async def get_sql_agent(cls) -> dict:
183183
- Do not use client name for filtering
184184
- Assets table contains snapshots by date; do not sum values across dates
185185
- Use StartTime for time-based filtering (meetings)
186+
- For asset values: if question is about total "asset value"/"portfolio value"/"AUM" → return SUM of latest investments; if about "current asset/investment value" → return all latest investments without SUM.
186187
- Only return the raw T-SQL query. No explanations or comments.
187188
"""
188189

0 commit comments

Comments
 (0)