Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
180 changes: 180 additions & 0 deletions backend/python_ai/check.json
Original file line number Diff line number Diff line change
Expand Up @@ -353,3 +353,183 @@
{"tx_id": "L4", "timestamp": "2026-02-10T11:06:00Z", "from_account": "ACC_C", "to_account": "HK_NODE_8821", "amount": 300000, "currency": "INR", "channel": "SWIFT", "country": "Hong Kong"}
]
}












{
"case_id": "e6a58469-2c0d-4447-a5c8-a1451a6acd66",
"generated_at": "2026-02-11T12:05:00Z",
"institution": "Demo National Bank",

"customer_kyc": {
"customer_id": "CUST991200",
"full_name": "Rakesh Patel",
"dob": "1988-02-21",
"pan": "ZXCVB1234Q",
"aadhaar_last4": "1109",
"occupation": "Retail Shop Owner",
"declared_annual_income": 420000,
"risk_category": "Medium",
"address": "Ahmedabad, Gujarat, India",
"kyc_last_updated": "2024-06-10"
},

"account_profile": {
"account_number": "XXXX5521",
"account_type": "Savings",
"opened_date": "2017-04-11",
"average_monthly_balance": 65000,
"average_monthly_credit": 90000,
"average_monthly_debit": 88000,
"usual_transaction_pattern": "Small retail deposits"
},

"alerts": [
{
"alert_id": "ALERT_22001",
"type": "Layering Pattern",
"description": "Funds routed across multiple intermediary accounts",
"trigger_time": "2026-02-10T11:02:00Z",
"severity": "Critical"
},
{
"alert_id": "ALERT_22002",
"type": "Rapid International Transfer",
"description": "Funds exited to high-risk jurisdiction",
"trigger_time": "2026-02-10T11:15:00Z",
"severity": "High"
}
],

"transactions": [

{ "tx_id": "S1", "timestamp": "2026-02-09T09:00:00Z", "from_account": "CLIENT_1", "to_account": "XXXX5521", "amount": 9800, "currency": "INR", "channel": "NEFT", "country": "India" },
{ "tx_id": "S2", "timestamp": "2026-02-09T09:10:00Z", "from_account": "CLIENT_2", "to_account": "XXXX5521", "amount": 9700, "currency": "INR", "channel": "NEFT", "country": "India" },
{ "tx_id": "S3", "timestamp": "2026-02-09T09:20:00Z", "from_account": "CLIENT_3", "to_account": "XXXX5521", "amount": 9900, "currency": "INR", "channel": "NEFT", "country": "India" },
{ "tx_id": "S4", "timestamp": "2026-02-09T09:30:00Z", "from_account": "CLIENT_4", "to_account": "XXXX5521", "amount": 9600, "currency": "INR", "channel": "NEFT", "country": "India" },
{ "tx_id": "S5", "timestamp": "2026-02-09T09:40:00Z", "from_account": "CLIENT_5", "to_account": "XXXX5521", "amount": 9500, "currency": "INR", "channel": "NEFT", "country": "India" },

{ "tx_id": "PT1", "timestamp": "2026-02-10T10:50:00Z", "from_account": "ACC_A", "to_account": "XXXX5521", "amount": 300000, "currency": "INR", "channel": "NEFT", "country": "India" },
{ "tx_id": "PT2", "timestamp": "2026-02-10T10:55:00Z", "from_account": "XXXX5521", "to_account": "ACC_B", "amount": 300000, "currency": "INR", "channel": "IMPS", "country": "India" },

{ "tx_id": "L1", "timestamp": "2026-02-10T11:00:00Z", "from_account": "ACC_B", "to_account": "ACC_C", "amount": 300000, "currency": "INR", "channel": "IMPS", "country": "India" },
{ "tx_id": "L2", "timestamp": "2026-02-10T11:05:00Z", "from_account": "ACC_C", "to_account": "ACC_D", "amount": 300000, "currency": "INR", "channel": "IMPS", "country": "India" },
{ "tx_id": "L3", "timestamp": "2026-02-10T11:10:00Z", "from_account": "ACC_D", "to_account": "HK_NODE_8821", "amount": 300000, "currency": "INR", "channel": "SWIFT", "country": "Hong Kong" },

{ "tx_id": "CB1", "timestamp": "2026-02-10T11:20:00Z", "from_account": "XXXX5521", "to_account": "US_ENTITY_1", "amount": 280000, "currency": "INR", "channel": "SWIFT", "country": "USA" },

{ "tx_id": "HV1", "timestamp": "2026-02-10T12:00:00Z", "from_account": "CLIENT_6", "to_account": "XXXX5521", "amount": 520000, "currency": "INR", "channel": "NEFT", "country": "India" },
{ "tx_id": "HV2", "timestamp": "2026-02-10T12:05:00Z", "from_account": "CLIENT_7", "to_account": "XXXX5521", "amount": 510000, "currency": "INR", "channel": "NEFT", "country": "India" },
{ "tx_id": "HV3", "timestamp": "2026-02-10T12:10:00Z", "from_account": "CLIENT_8", "to_account": "XXXX5521", "amount": 530000, "currency": "INR", "channel": "NEFT", "country": "India" },
{ "tx_id": "HV4", "timestamp": "2026-02-10T12:15:00Z", "from_account": "CLIENT_9", "to_account": "XXXX5521", "amount": 540000, "currency": "INR", "channel": "NEFT", "country": "India" },
{ "tx_id": "HV5", "timestamp": "2026-02-10T12:20:00Z", "from_account": "CLIENT_10", "to_account": "XXXX5521", "amount": 550000, "currency": "INR", "channel": "NEFT", "country": "India" },

{ "tx_id": "DP1", "timestamp": "2026-02-10T12:25:00Z", "from_account": "XXXX5521", "to_account": "LOCAL_VENDOR", "amount": 500000, "currency": "INR", "channel": "RTGS", "country": "India" },
{ "tx_id": "DP2", "timestamp": "2026-02-10T12:30:00Z", "from_account": "XXXX5521", "to_account": "INVESTMENT_ACC", "amount": 450000, "currency": "INR", "channel": "Online", "country": "India" }
]
}


















{
"case_id": "9f3c2a1b-7d44-4e2f-9b77-2ac91f6e8c10",
"generated_at": "2026-02-25T14:10:00Z",
"institution": "Suryodaya National Bank",
"customer_kyc": {
"customer_id": "CUST774512",
"full_name": "Amit Kulkarni",
"dob": "1990-08-14",
"pan": "AKLPK8291R",
"aadhaar_last4": "4821",
"occupation": "Mobile Accessories Shop Owner",
"declared_annual_income": 480000,
"risk_category": "Medium",
"address": "Karve Nagar, Pune, Maharashtra, India",
"kyc_last_updated": "2025-05-12"
},
"account_profile": {
"account_number": "SBIN77451209",
"account_type": "Savings",
"opened_date": "2018-03-22",
"average_monthly_balance": 72000,
"average_monthly_credit": 95000,
"average_monthly_debit": 91000,
"usual_transaction_pattern": "Small retail UPI and NEFT deposits below INR 20,000"
},
"alerts": [
{
"alert_id": "ALERT_31001",
"type": "Structured Deposits",
"description": "Multiple credits just below reporting threshold within short duration",
"trigger_time": "2026-02-24T10:15:00Z",
"severity": "High"
},
{
"alert_id": "ALERT_31002",
"type": "Layering Pattern",
"description": "Funds routed through multiple intermediary and shell entities",
"trigger_time": "2026-02-24T11:05:00Z",
"severity": "Critical"
},
{
"alert_id": "ALERT_31003",
"type": "Rapid Movement",
"description": "High-value funds transferred within minutes of receipt",
"trigger_time": "2026-02-24T11:20:00Z",
"severity": "High"
},
{
"alert_id": "ALERT_31004",
"type": "Cross Border Escalation",
"description": "Funds moved to Hong Kong and UAE through layered transactions",
"trigger_time": "2026-02-24T12:10:00Z",
"severity": "Critical"
}
],
"transactions": [
{ "tx_id": "T01", "timestamp": "2026-02-24T09:05:00Z", "from_account": "RETAIL_CUST_01", "to_account": "SBIN77451209", "amount": 12500, "currency": "INR", "channel": "UPI", "country": "India" },
{ "tx_id": "T02", "timestamp": "2026-02-24T09:22:00Z", "from_account": "RETAIL_CUST_02", "to_account": "SBIN77451209", "amount": 18200, "currency": "INR", "channel": "UPI", "country": "India" },
{ "tx_id": "T03", "timestamp": "2026-02-24T10:00:00Z", "from_account": "CASH_DEPOSIT_BRANCH_PUNE", "to_account": "SBIN77451209", "amount": 299800, "currency": "INR", "channel": "Cash", "country": "India" },
{ "tx_id": "T04", "timestamp": "2026-02-24T10:07:00Z", "from_account": "CASH_DEPOSIT_BRANCH_PUNE", "to_account": "SBIN77451209", "amount": 300200, "currency": "INR", "channel": "Cash", "country": "India" },
{ "tx_id": "T05", "timestamp": "2026-02-24T10:14:00Z", "from_account": "CASH_DEPOSIT_BRANCH_PUNE", "to_account": "SBIN77451209", "amount": 298900, "currency": "INR", "channel": "Cash", "country": "India" },
{ "tx_id": "T06", "timestamp": "2026-02-24T10:20:00Z", "from_account": "SBIN77451209", "to_account": "SHELL_ALPHA_TRADERS", "amount": 299750, "currency": "INR", "channel": "IMPS", "country": "India" },
{ "tx_id": "T07", "timestamp": "2026-02-24T10:26:00Z", "from_account": "SBIN77451209", "to_account": "SHELL_BETA_EXPORTS", "amount": 300150, "currency": "INR", "channel": "IMPS", "country": "India" },
{ "tx_id": "T08", "timestamp": "2026-02-24T10:31:00Z", "from_account": "SBIN77451209", "to_account": "SHELL_GAMMA_SERVICES", "amount": 298700, "currency": "INR", "channel": "IMPS", "country": "India" },
{ "tx_id": "T09", "timestamp": "2026-02-24T10:36:00Z", "from_account": "SHELL_ALPHA_TRADERS", "to_account": "MULE_ACCOUNT_DELHI", "amount": 299750, "currency": "INR", "channel": "NEFT", "country": "India" },
{ "tx_id": "T10", "timestamp": "2026-02-24T10:42:00Z", "from_account": "SHELL_BETA_EXPORTS", "to_account": "MULE_ACCOUNT_DELHI", "amount": 300150, "currency": "INR", "channel": "NEFT", "country": "India" },
{ "tx_id": "T11", "timestamp": "2026-02-24T10:48:00Z", "from_account": "SHELL_GAMMA_SERVICES", "to_account": "MULE_ACCOUNT_DELHI", "amount": 298700, "currency": "INR", "channel": "NEFT", "country": "India" },
{ "tx_id": "T12", "timestamp": "2026-02-24T11:00:00Z", "from_account": "MULE_ACCOUNT_DELHI", "to_account": "HK_BRIDGE_8821", "amount": 898600, "currency": "INR", "channel": "SWIFT", "country": "Hong Kong" },
{ "tx_id": "T13", "timestamp": "2026-02-24T11:25:00Z", "from_account": "HK_BRIDGE_8821", "to_account": "UAE_NODE_4411", "amount": 890000, "currency": "INR", "channel": "SWIFT", "country": "United Arab Emirates" },
{ "tx_id": "T14", "timestamp": "2026-02-24T11:50:00Z", "from_account": "UAE_NODE_4411", "to_account": "SHELL_ALPHA_TRADERS", "amount": 882500, "currency": "INR", "channel": "SWIFT", "country": "India" },
{ "tx_id": "T15", "timestamp": "2026-02-24T12:05:00Z", "from_account": "SHELL_ALPHA_TRADERS", "to_account": "SBIN77451209", "amount": 440000, "currency": "INR", "channel": "RTGS", "country": "India" },
{ "tx_id": "T16", "timestamp": "2026-02-24T12:12:00Z", "from_account": "SBIN77451209", "to_account": "LOCAL_SUPPLIER_PUNE", "amount": 38000, "currency": "INR", "channel": "NEFT", "country": "India" },
{ "tx_id": "T17", "timestamp": "2026-02-24T12:20:00Z", "from_account": "SBIN77451209", "to_account": "MULE_ACCOUNT_DELHI", "amount": 435000, "currency": "INR", "channel": "IMPS", "country": "India" },
{ "tx_id": "T18", "timestamp": "2026-02-24T12:27:00Z", "from_account": "MULE_ACCOUNT_DELHI", "to_account": "HK_BRIDGE_8821", "amount": 435000, "currency": "INR", "channel": "SWIFT", "country": "Hong Kong" },
{ "tx_id": "T19", "timestamp": "2026-02-24T13:10:00Z", "from_account": "RETAIL_CUST_03", "to_account": "SBIN77451209", "amount": 15600, "currency": "INR", "channel": "UPI", "country": "India" },
{ "tx_id": "T20", "timestamp": "2026-02-24T14:05:00Z", "from_account": "SHELL_BETA_EXPORTS", "to_account": "SBIN77451209", "amount": 210000, "currency": "INR", "channel": "RTGS", "country": "India" }
]
}
Comment on lines +458 to +535
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Sensitive-looking data in test fixtures — confirm it is fully synthetic.

This file contains PAN numbers, Aadhaar (last 4), full names, DOBs, and addresses. Even for test data, ensure none of these correspond to real individuals. Consider adding a comment at the top of the file stating the data is entirely fictitious.

🧰 Tools
🪛 Biome (2.4.4)

[error] 458-535: End of file expected

(parse)

74 changes: 73 additions & 1 deletion backend/python_ai/output.json
Original file line number Diff line number Diff line change
Expand Up @@ -310,4 +310,76 @@
"narrative": "Sanjay Kumar, born 2000-01-14, is a student with a declared annual income of INR 0. His KYC was last updated on 2023-11-02, and he is categorized as a High-risk customer. Account XXXX4401, a savings account, was opened on 2023-12-01. The usual transaction pattern for this account is described as 'Minimal student spending', with an average monthly credit of INR 7,000.\n\nOn 2026-02-10, a series of four high-value transactions, totaling INR 800,000, occurred within approximately one hour, which is inconsistent with the customer's profile and usual account activity.\nAt 12:00:00Z, account XXXX4401 received INR 200,000 via UPI from ACC_P1.\nAt 12:05:00Z, INR 200,000 was transferred via UPI from account XXXX4401 to ACC_P2.\nAt 12:10:00Z, account XXXX4401 received INR 200,000 via UPI from ACC_P2.\nAt 12:20:00Z, INR 200,000 was transferred via SWIFT from account XXXX4401 to DUBAI_NODE_888 in UAE.\n\nThis activity demonstrates a same-day inflow of INR 400,000 and outflow of INR 400,000. A circular fund flow pattern was detected among accounts ACC_P1, XXXX4401, and ACC_P2. The total transaction volume of INR 800,000 significantly exceeds the customer's declared annual income of INR 0 and the expected annual credit based on the average monthly credit of INR 7,000. An alert for 'Mule Funnel Activity' (ALERT_44001) was triggered at 2026-02-10T13:12:00Z, indicating the account is receiving and forwarding funds for multiple entities. The presence of an international transfer to UAE further raises concerns regarding the nature and purpose of these transactions.",
"recommended_action": "Further investigation and enhanced monitoring of the subject's account and related activities are recommended."
}
}
}








///Prompt
Generate a highly realistic AML investigation case in STRICT JSON format.

⚠️ Output ONLY valid JSON. No explanation text.

Follow EXACTLY this schema:

{
"case_id": "...",
"generated_at": "...",
"institution": "...",
"customer_kyc": { ... },
"account_profile": { ... },
"alerts": [ ... ],
"transactions": [ ... ]
}

Requirements:

1. Make transaction network COMPLEX and GRAPH-DEPENDENT:
- Use at least 15–25 transactions.
- Include layering (3–5 hops).
- Include circular fund routing (money eventually returns to origin via different path).
- Include split-and-merge structuring (1 amount → split into 3 → merged again).
- Include pass-through behavior (same amount within 10 minutes).
- Include cross-border transfers via 2 jurisdictions.
- Include at least 2 intermediary shell accounts.
- Include 1 account that acts as both receiver and sender multiple times.

2. Make it HARD for rule-based detection:
- Slightly vary amounts (299,800; 300,200; etc).
- Spread transactions across multiple hours.
- Use different channels (NEFT, IMPS, SWIFT, RTGS, Online).
- Mix legitimate-looking retail deposits with suspicious activity.
- Add noise transactions that look normal.

3. Ensure the suspicious pattern is ONLY clearly visible if someone:
- Traverses graph paths
- Detects multi-hop fund flow
- Detects circular return to origin
- Detects structuring across accounts

4. Customer profile:
- Medium income individual
- Declared income much lower than total suspicious volume
- Realistic Indian KYC details

5. Alerts:
- Add 3–4 alerts:
- Layering Pattern
- Structured Deposits
- Rapid Movement
- Cross Border Escalation

6. Ensure:
- All accounts referenced in transactions exist in flow
- Timestamps are chronological
- At least 1 transaction chain is 4 hops deep
- Total suspicious flow > 15x declared annual income

7. Currency: INR
8. Use realistic names and Indian geography.

Output ONLY JSON.
Comment on lines +322 to +385
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Prompt template embedded as raw text in a .json file — move to a dedicated file.

The AML case generation prompt (lines 322–385) is appended as plain text after JSON content, making the entire file invalid JSON. This prompt should live in its own file (e.g., prompts/aml_case_generation.txt or .md) or be stored as a properly escaped string value within a JSON structure.

🧰 Tools
🪛 Biome (2.4.4)

[error] 322-327: End of file expected

(parse)


[error] 323-323: unexpected character .

(parse)


[error] 325-325: unexpected character !

(parse)


[error] 325-325: unexpected character

(parse)


[error] 325-325: unexpected character .

(parse)


[error] 325-325: unexpected character .

(parse)


[error] 333-333: unexpected character .

(parse)


[error] 333-333: unexpected character .

(parse)


[error] 333-333: unexpected character .

(parse)


[error] 334-334: unexpected character .

(parse)


[error] 334-334: unexpected character .

(parse)


[error] 334-334: unexpected character .

(parse)


[error] 335-335: unexpected character .

(parse)


[error] 335-335: unexpected character .

(parse)


[error] 335-335: unexpected character .

(parse)


[error] 336-336: unexpected character .

(parse)


[error] 336-336: unexpected character .

(parse)


[error] 329-337: End of file expected

(parse)


[error] 336-336: unexpected character .

(parse)


[error] 339-339: String values must be double quoted.

(parse)


[error] 339-342: End of file expected

(parse)


[error] 341-341: Missing fraction

(parse)


[error] 341-341: Minus must be followed by a digit

(parse)


[error] 342-342: Minus must be followed by a digit

(parse)


[error] 342-342: End of file expected

(parse)


[error] 342-342: unexpected character

(parse)


[error] 342-342: End of file expected

(parse)


[error] 342-342: String values must be double quoted.

(parse)


[error] 342-342: unexpected character .

(parse)


[error] 343-343: Minus must be followed by a digit

(parse)


[error] 343-343: String values must be double quoted.

(parse)


[error] 343-343: String values must be double quoted.

(parse)


[error] 343-343: unexpected character (

(parse)


[error] 343-343: End of file expected

(parse)


[error] 343-343: unexpected character

(parse)


[error] 343-343: End of file expected

(parse)


[error] 343-343: String values must be double quoted.

(parse)


[error] 343-343: unexpected character )

(parse)


[error] 343-343: unexpected character .

(parse)


[error] 344-344: Minus must be followed by a digit

(parse)


[error] 344-344: String values must be double quoted.

(parse)


[error] 344-344: String values must be double quoted.

(parse)


[error] 344-344: String values must be double quoted.

(parse)


[error] 344-344: String values must be double quoted.

(parse)


[error] 344-344: unexpected character (

(parse)


[error] 344-344: String values must be double quoted.

(parse)


[error] 344-344: String values must be double quoted.

(parse)


[error] 344-344: String values must be double quoted.

(parse)


[error] 344-344: String values must be double quoted.

(parse)


[error] 344-344: String values must be double quoted.

(parse)


[error] 344-344: String values must be double quoted.

(parse)


[error] 344-344: String values must be double quoted.

(parse)


[error] 344-344: String values must be double quoted.

(parse)


[error] 344-344: unexpected character )

(parse)


[error] 344-344: unexpected character .

(parse)


[error] 345-345: Minus must be followed by a digit

(parse)


[error] 345-345: String values must be double quoted.

(parse)


[error] 345-345: String values must be double quoted.

(parse)


[error] 345-345: Minus must be followed by a digit

(parse)


[error] 345-345: String values must be double quoted.

(parse)


[error] 345-345: Minus must be followed by a digit

(parse)


[error] 345-345: String values must be double quoted.

(parse)


[error] 345-345: String values must be double quoted.

(parse)


[error] 345-345: unexpected character (

(parse)


[error] 345-345: End of file expected

(parse)


[error] 345-345: String values must be double quoted.

(parse)


[error] 345-345: unexpected character

(parse)


[error] 345-345: String values must be double quoted.

(parse)


[error] 345-345: String values must be double quoted.

(parse)


[error] 345-345: End of file expected

(parse)


[error] 345-345: unexpected character

(parse)


[error] 345-345: String values must be double quoted.

(parse)


[error] 345-345: String values must be double quoted.

(parse)


[error] 345-345: unexpected character )

(parse)


[error] 345-345: unexpected character .

(parse)


[error] 346-346: Minus must be followed by a digit

(parse)


[error] 346-346: String values must be double quoted.

(parse)


[error] 346-346: String values must be double quoted.

(parse)


[error] 346-346: Minus must be followed by a digit

(parse)


[error] 346-346: String values must be double quoted.

(parse)


[error] 346-346: String values must be double quoted.

(parse)


[error] 346-346: unexpected character (

(parse)


[error] 346-346: String values must be double quoted.

(parse)


[error] 346-346: String values must be double quoted.

(parse)


[error] 346-346: String values must be double quoted.

(parse)


[error] 346-346: End of file expected

(parse)


[error] 346-346: String values must be double quoted.

(parse)


[error] 346-346: unexpected character )

(parse)


[error] 346-346: unexpected character .

(parse)


[error] 347-347: Minus must be followed by a digit

(parse)


[error] 347-347: String values must be double quoted.

(parse)


[error] 347-347: String values must be double quoted.

(parse)


[error] 347-347: Minus must be followed by a digit

(parse)


[error] 347-347: String values must be double quoted.

(parse)


[error] 347-347: String values must be double quoted.

(parse)


[error] 347-347: String values must be double quoted.

(parse)


[error] 347-347: End of file expected

(parse)


[error] 347-347: String values must be double quoted.

(parse)


[error] 347-347: unexpected character .

(parse)


[error] 348-348: Minus must be followed by a digit

(parse)


[error] 348-348: String values must be double quoted.

(parse)


[error] 348-348: String values must be double quoted.

(parse)


[error] 348-348: String values must be double quoted.

(parse)


[error] 348-348: End of file expected

(parse)


[error] 348-348: String values must be double quoted.

(parse)


[error] 348-348: String values must be double quoted.

(parse)


[error] 348-348: String values must be double quoted.

(parse)


[error] 348-348: unexpected character .

(parse)


[error] 349-349: Minus must be followed by a digit

(parse)


[error] 349-349: String values must be double quoted.

(parse)


[error] 349-349: End of file expected

(parse)


[error] 349-349: String values must be double quoted.

(parse)


[error] 349-349: String values must be double quoted.

(parse)


[error] 349-349: String values must be double quoted.

(parse)


[error] 349-349: String values must be double quoted.

(parse)


[error] 349-349: String values must be double quoted.

(parse)


[error] 349-349: String values must be double quoted.

(parse)


[error] 349-349: String values must be double quoted.

(parse)


[error] 349-349: String values must be double quoted.

(parse)


[error] 349-349: String values must be double quoted.

(parse)


[error] 349-349: String values must be double quoted.

(parse)


[error] 349-349: unexpected character .

(parse)


[error] 351-351: End of file expected

(parse)


[error] 351-351: Missing fraction

(parse)


[error] 351-351: String values must be double quoted.

(parse)


[error] 351-351: String values must be double quoted.

(parse)


[error] 351-351: String values must be double quoted.

(parse)


[error] 351-351: String values must be double quoted.

(parse)


[error] 351-351: String values must be double quoted.

(parse)


[error] 351-351: Minus must be followed by a digit

(parse)


[error] 351-351: String values must be double quoted.

(parse)


[error] 351-351: String values must be double quoted.

(parse)


[error] 351-352: End of file expected

(parse)


[error] 352-352: Minus must be followed by a digit

(parse)


[error] 352-352: unexpected character (

(parse)


[error] 352-352: End of file expected

(parse)


[error] 352-352: End of file expected

(parse)


[error] 352-352: End of file expected

(parse)


[error] 352-352: unexpected character ;

(parse)


[error] 352-352: End of file expected

(parse)


[error] 352-352: End of file expected

(parse)


[error] 352-352: End of file expected

(parse)


[error] 352-352: unexpected character ;

(parse)


[error] 352-352: String values must be double quoted.

(parse)


[error] 352-352: unexpected character )

(parse)


[error] 352-352: unexpected character .

(parse)


[error] 353-353: Minus must be followed by a digit

(parse)


[error] 353-353: String values must be double quoted.

(parse)


[error] 353-353: String values must be double quoted.

(parse)


[error] 353-353: String values must be double quoted.

(parse)


[error] 353-353: String values must be double quoted.

(parse)


[error] 353-353: String values must be double quoted.

(parse)


[error] 353-353: unexpected character .

(parse)


[error] 354-354: Minus must be followed by a digit

(parse)


[error] 354-354: String values must be double quoted.

(parse)


[error] 354-354: String values must be double quoted.

(parse)


[error] 354-354: String values must be double quoted.

(parse)


[error] 354-354: unexpected character (

(parse)


[error] 354-354: String values must be double quoted.

(parse)


[error] 354-370: End of file expected

(parse)


[error] 354-354: unexpected character )

(parse)


[error] 354-354: unexpected character .

(parse)


[error] 355-355: Minus must be followed by a digit

(parse)


[error] 355-355: Minus must be followed by a digit

(parse)


[error] 355-355: unexpected character .

(parse)


[error] 356-356: Minus must be followed by a digit

(parse)


[error] 356-356: unexpected character .

(parse)


[error] 358-358: Missing fraction

(parse)


[error] 359-359: Minus must be followed by a digit

(parse)


[error] 360-360: Minus must be followed by a digit

(parse)


[error] 360-360: Minus must be followed by a digit

(parse)


[error] 361-361: Minus must be followed by a digit

(parse)


[error] 362-362: Minus must be followed by a digit

(parse)


[error] 364-364: Missing fraction

(parse)


[error] 365-365: Minus must be followed by a digit

(parse)


[error] 366-366: Minus must be followed by a digit

(parse)


[error] 367-367: Minus must be followed by a digit

(parse)


[error] 369-369: Missing fraction

(parse)


[error] 370-370: Minus must be followed by a digit

(parse)


[error] 370-370: End of file expected

(parse)


[error] 370-370: unexpected character

(parse)


[error] 370-370: End of file expected

(parse)


[error] 370-370: String values must be double quoted.

(parse)


[error] 370-379: End of file expected

(parse)


[error] 371-371: Minus must be followed by a digit

(parse)


[error] 372-372: Minus must be followed by a digit

(parse)


[error] 373-373: Minus must be followed by a digit

(parse)


[error] 374-374: Minus must be followed by a digit

(parse)


[error] 376-376: Missing fraction

(parse)


[error] 377-377: Minus must be followed by a digit

(parse)


[error] 378-378: Minus must be followed by a digit

(parse)


[error] 379-379: Minus must be followed by a digit

(parse)


[error] 379-379: End of file expected

(parse)


[error] 379-379: String values must be double quoted.

(parse)


[error] 379-379: String values must be double quoted.

(parse)


[error] 379-379: String values must be double quoted.

(parse)


[error] 379-379: End of file expected

(parse)


[error] 379-379: String values must be double quoted.

(parse)


[error] 379-379: String values must be double quoted.

(parse)


[error] 380-380: Minus must be followed by a digit

(parse)


[error] 380-380: String values must be double quoted.

(parse)


[error] 380-380: String values must be double quoted.

(parse)


[error] 380-380: String values must be double quoted.

(parse)


[error] 380-380: unexpected character >

(parse)


[error] 380-380: End of file expected

(parse)


[error] 380-380: String values must be double quoted.

(parse)


[error] 380-380: String values must be double quoted.

(parse)


[error] 380-380: String values must be double quoted.

(parse)


[error] 380-380: String values must be double quoted.

(parse)


[error] 382-382: End of file expected

(parse)


[error] 382-382: Missing fraction

(parse)


[error] 382-382: String values must be double quoted.

(parse)


[error] 382-385: End of file expected

(parse)


[error] 383-383: Missing fraction

(parse)


[error] 383-383: unexpected character .

(parse)


[error] 385-385: unexpected character .

(parse)

11 changes: 5 additions & 6 deletions backend/python_ai/routes/graph_route.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from fastapi import APIRouter, HTTPException
from services.neo4j_service import insert_case_data

from services.case_analysis_service import analyze_case
from services.graphtools.aml_engine import run_full_investigation
# from services.case_analysis_service import analyze_case


router = APIRouter()
Expand All @@ -15,11 +15,10 @@ async def ingest_case(case_json: dict):



@router.get("/case/{case_id}/investigate")
async def investigate_case(case_id: str):

@router.get("/case/{case_id}/analysis")
async def case_analysis(case_id: str):

result = analyze_case(case_id)
result = run_full_investigation(case_id)

if not result:
raise HTTPException(status_code=404, detail="Case not found")
Expand Down
Loading