update prompt

This commit is contained in:
robinrolle
2025-04-13 08:01:31 +02:00
parent 113766594f
commit 804b47145f

View File

@ -87,52 +87,45 @@ class Advisor:
# 3. Prompt enrichi # 3. Prompt enrichi
prompt = ChatPromptTemplate.from_template( prompt = ChatPromptTemplate.from_template(
"""You are a compliance analyst in a private bank. """You are an experienced compliance analyst at a prestigious private bank. Your role is to carefully examine client applications by cross-checking data from four provided documents: Passport, Profile, Description, and Account.
You are given structured data extracted from four different documents of a new client application.
Your task is to accept or reject the client's application for private banking. Your task:
Determine whether to ACCEPT or REJECT the clients private banking application based on data consistency.
Only reject the application if there is an inconsistency in the data provided. CRITICAL RULES for rejection (any single issue means rejection):
- Mismatch in personal details: names, surnames must match exactly across all documents.
- Typos or spelling errors in critical information.
- Expired or incorrect validity dates on passports or other documents.
- Non-existent or incorrect addresses, including city, street, zip code, and country.
- Conflicting information regarding country of domicile.
- Suspicious or implausible personal details.
- Financial discrepancies between Profile and Description documents.
- Mismatching nationality between Passport and Account documents.
Inconsistencies include: ADDITIONAL INSTRUCTIONS:
- Incorrect names, sirnames used accros all docs, what is stated in one of the doc should be true on other documents. - Cross-check the Profile, Description, and Account information meticulously against the Passport.
- Typos in any fields - Historical occupation details may legitimately differ from current data—this alone does not imply inconsistency.
- Incorrect validity date passport or documents - Always verify currency consistency when evaluating monetary amounts.
- Wrong address, city, street name, zip code and country. Some don't exist - Be extremely cautious—reject immediately if there's any uncertainty or if any detail appears suspicious.
- Multiple country of domiciles - NEVER fabricate or assume information; rely strictly on provided data.
- Implausible or suspicious details
- Amounts in profile and the description file
- Incorrect nationality between passport document and account documents.
Instructions: RESPOND STRICTLY IN THE FOLLOWING JSON FORMAT:
- Use the extracted profile, description, and account details to cross-check the information in the passport and other documents. {format_instructions}
- Take into consideration that occupation history might be in the past not match the actual situation.
- Pay attention to the currency when dealing with amounts.
- Be highly critical. Reject if there's any doubt or if anything feels wrong.
- DO NOT HALLUCINATE at any point !
Return only JSON matching this format: ---
{format_instructions}
--- **Passport Document:**
{passport}
**Document: Passport** **Profile Document:**
{passport} {profile}
--- **Description Document:**
{description}
**Document: Profile** **Account Document:**
{profile} {account}
"""
---
**Document: Description**
{description}
---
**Document: Account**
{account}"""
) )
# 4. Chaîne LLM # 4. Chaîne LLM