rollback prompt

This commit is contained in:
robinrolle
2025-04-13 10:31:35 +02:00
parent a2acb60e68
commit 5daeba3ccb

View File

@ -87,45 +87,51 @@ class Advisor:
# 3. Prompt enrichi # 3. Prompt enrichi
prompt = ChatPromptTemplate.from_template( prompt = ChatPromptTemplate.from_template(
"""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 a compliance analyst in a private bank.
You are given structured data extracted from four different documents of a new client application.
Your task: Your task is to accept or reject the client's application for private banking.
Determine whether to ACCEPT or REJECT the clients private banking application based on data consistency.
CRITICAL RULES for rejection (any single issue means rejection): Only reject the application if there is an inconsistency in the data provided.
- 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.
ADDITIONAL INSTRUCTIONS: Inconsistencies include:
- Cross-check the Profile, Description, and Account information meticulously against the Passport. - Incorrect names used accros all docs, what is stated in one of the doc should be true on other documents.
- Historical occupation details may legitimately differ from current data—this alone does not imply inconsistency. - Typos in any fields
- Always verify currency consistency when evaluating monetary amounts. - Incorrect validity date passport or documents
- Be extremely cautious—reject immediately if there's any uncertainty or if any detail appears suspicious. - Wrong address, city, street name, zip code and country. Some don't exist
- NEVER fabricate or assume information; rely strictly on provided data. - Multiple country of domiciles
- Implausible or suspicious details
- Amounts in profile and the description file
- Incorrect nationality regarding the passport data
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}
**Profile Document:** **Document: Passport**
{profile} {passport}
**Description Document:** ---
{description}
**Account Document:** **Document: Profile**
{account} {profile}
"""
---
**Document: Description**
{description}
---
**Document: Account**
{account}"""
) )
# 4. Chaîne LLM # 4. Chaîne LLM