How to automate KYC and due diligence with AI
![Paul Omenaca](/_next/image?url=%2Favatars%2Fpablo.jpeg&w=64&q=75)
Paul Omenaca
@houmland
![How to automate KYC and due diligence with AI](/_next/image?url=%2Fblog-assets%2Fkyc-guide%2Fkyc-guide-thumbnail.png&w=1920&q=75)
KYC is critically important for financial institutions, enabling fraud detection and prevention, compliance with anti-money laundering regulations, customer protection, and more.
However, KYC and customer due diligence can be extremely complex and time-consuming.
Did you know that banks allocate ~10% of their workforce to compliance-related activities, with KYC often being the most costly? Many institutions still rely on manual KYC processes, which are resource-intensive and prone to errors.
This also impacts the customer experience. Customers are contacted multiple times during onboarding and asked to provide numerous documents.
What if you could set up an AI in a secure and fully private environment to handle these back-office processes? This is not as utopian as it seems. Financial institutions worldwide are already embedding AI assistants to manage certain KYC processes. Let’s take a look.
Architecting a Solution
This use case showcases how a US financial institution used Stack AI to automate one of their KYC processes.
The process is as follows: a customer sends an email with their requirements. An AI system then extracts the relevant information, performs due diligence, updates the company database if successful, and drafts and sends a response email.
KYC Use Case Architecture
Components:
- Receive Information from the Customer:
- Input: Information received via email (subject, recipient, body, attachments)
- LLM: OpenAI GPT 4o extracts names and relevant information from the documents
- Perform Customer Due Diligence:
- Google Search: Conducts a web search and scrapes the top 5 links based on the customer's information
- Internal Knowledge Base: Retrieves internal procedures for due diligence
- External API: Retrieves information from external sources
- LLM: OpenAI GPT 4o generates the customer's due diligence report
- Output: Due diligence report (in JSON format) is uploaded to the company’s database via API
- Email the Customer with the Outcome:
- LLM: Drafts an email based on the customer's information and due diligence report
- Output: Email sent to the customer
Putting It All Together with Stack AI
You can use our visual builder to create very easily a workflow that automates the entire KYC process. Moreover, you can easily customize this architecture by adding more nodes, such as additional API calls, knowledge bases, or LLMs.
KYC Overview in Stack AI
Let's break it down and see how you can automate each step with Stack AI.
1. Receive Information from the Customer
![Step 1](/blog-assets/kyc-guide/kyc-step1.png)
For every email sent by a customer, an OpenAI LLM (GPT 4o) receives all the information, including attachments, and extracts the full name of the person.
Prompt used (OpenAI 4o):
You extract the full name of the person in the documents.
<Documents>
{gmail_in-0}
</Documents>
Respond only with the full name of the person.
[if not name, just respond that the name was not found]
2. Perform Customer Due Diligence
![Step 2](/blog-assets/kyc-guide/kyc-step2.png)
Given the name of the customer and other parameters, a web search is triggered to retrieve more information about the customer, from internal data bases and external ones.
Once done, another OpenAI model draft the due diligence report and uploads the information into the company's database.
Prompt used (OpenAI GPT 4o):
You are KYC reviewer for a bank. You will receive client documents and extract a JSON.
Guidelines on KYC workflows:
<>
{docemb-0}
</>
If the information is not complete or accurate, send an email to customer support.
Documentation on the person:
<doc>
{gmail_in-0}
</doc>
Google Search results on the person
<google>
{serpapi-0}
</google>
You are KYC reviewer for a bank. You will receive client documents and extract a JSON with the following data:
1. "Full Name": str
2. "Address": str
3. "Government ID": str
4. "Nationality": str
5. "Source of funds/income": str
6. "Politically exposed person (PEP) status": boolean
3. Email the Customer with the Outcome
![Step 2](/blog-assets/kyc-guide/kyc-step3.png)
The due diligence report is used together with the information from the customer's initial email to draft an email with the outcome of the process.
Prompt (Anthropic Clause 3 Sonnet):
Respond in beautiful HTML which is the body of this email.
Write a diligence report on the following data:
<data>
{llm-0}
</data>
You might be asking yourself: once I make this automation live, is there a way to track responses?
Absolutely, our platform includes internal analytics accessible through the Analytics tab. You can review every workflow execution, check for errors, monitor latency, generate reports, and more.
Simplifying KYC
KYC can be a daunting process, but it is essential for financial institutions. AI can reduce KYC costs by 70% while enhancing the customer experience and improving accuracy.
With Stack AI, you can automate business processes in a secure environment. We are SOC 2 Type II, HIPAA, and GDPR compliant, making us the go-to AI builder for Enterprises.
We have a proven track record, partnering with financial institutions worldwide. Leverage our existing templates and easily customize them to your business needs—no coding experience required.
Automate your processes with Stack AI at a fraction of the cost of an in-house development team (~80% less expensive), in a matter of days instead of months, and benefit from high-quality AI systems.