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.
Inconsistencies include: - Typos or spelling errors in critical information.
- Incorrect names, sirnames used accros all docs, what is stated in one of the doc should be true on other documents. - Expired or incorrect validity dates on passports or other documents.
- Typos in any fields - Non-existent or incorrect addresses, including city, street, zip code, and country.
- Incorrect validity date passport or documents - Conflicting information regarding country of domicile.
- Wrong address, city, street name, zip code and country. Some don't exist - Suspicious or implausible personal details.
- Multiple country of domiciles - Financial discrepancies between Profile and Description documents.
- Implausible or suspicious details - Mismatching nationality between Passport and Account documents.
- Amounts in profile and the description file
- Incorrect nationality between passport document and account documents.
Instructions:
- Use the extracted profile, description, and account details to cross-check the information in the passport and other documents.
- 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: ADDITIONAL INSTRUCTIONS:
{format_instructions} - Cross-check the Profile, Description, and Account information meticulously against the Passport.
- Historical occupation details may legitimately differ from current data—this alone does not imply inconsistency.
- Always verify currency consistency when evaluating monetary amounts.
- Be extremely cautious—reject immediately if there's any uncertainty or if any detail appears suspicious.
- NEVER fabricate or assume information; rely strictly on provided data.
--- RESPOND STRICTLY IN THE FOLLOWING JSON FORMAT:
{format_instructions}
**Document: Passport** ---
{passport}
--- **Passport Document:**
{passport}
**Document: Profile** **Profile Document:**
{profile} {profile}
--- **Description Document:**
{description}
**Document: Description** **Account Document:**
{description} {account}
"""
---
**Document: Account**
{account}"""
) )
# 4. Chaîne LLM # 4. Chaîne LLM