Although artificial intelligence appeared in the world relatively recently, most people and companies still use it mainly in the form of questions and answers in ChatGPT. For many, this is what is associated with the concept of “using AI.” This is also confirmed by McKinsey data, according to which more than 75% of businesses are already experimenting with AI, but almost 60% are limited to using generative models for basic tasks — writing texts, analyzing data, or working with code.
Therefore, ChatGPT is just one of numerous AI services, created to answer questions, edit texts, and generate images. And this alone is enough to impress any ordinary user.
Many leading companies in the world have started creating their own AI models and products for practical application. This has given businesses the opportunity to integrate artificial intelligence into their processes and increase operational efficiency. For example, according to PwC, companies that have integrated AI into key processes reduce operating costs by 20–40% and increase productivity by 30%.
Company requests can vary. Some need an AI chatbot that responds to customers 24/7, covers up to 80% of typical inquiries, and transfers the conversation to an operator only when the question is too specific. According to IBM statistics, businesses that have implemented AI chatbots have reduced the workload on operators by up to 70% and decreased customer waiting time by 90%. For businesses, this means a significant acceleration of service and the ability to optimize support costs.
There are financial companies that need to periodically conduct user verification. It should be noted right away: a full-fledged verification module is a complex technological solution, but businesses can implement individual parts of it. For example, document verification can be integrated not only into financial services but also into the work of domain name registrars or utility service providers. The KYC (Know Your Customer) solutions market reached $12.4 billion in 2024 and, according to forecasts, will grow by 22% annually. The main drivers are regulatory requirements, combating money laundering, and fraud prevention.
Now, if an action requires document verification, it is necessary not only to upload the file but also to extract information from it and save the data in the client’s profile and the company’s database. Previously, this required asking the user to manually enter all the data and additionally upload the document. Now this process can be automated: the system extracts the necessary information on its own without additional requests to the client. OCR technologies and AI analytics reduce the time for document verification from 5–10 minutes to a few seconds and decrease the number of errors by 80%, according to Deloitte. This approach is especially relevant for financial institutions and services where speed and accuracy of data processing are critical.
Screenshot from the official Google Document AI service:
Next, we will look at how to implement a similar solution using Google Cloud, utilizing Vertex AI and Document AI services. This is a universal approach that can be adapted for companies in various sectors.
Let’s break it down step by step using the example of Google Cloud: Vertex AI and Document AI.
Below is a glossary to better understand the purpose of each service:
Document AI API — used for automatic reading and recognition of data from documents (IDs, passports, invoices). It allows obtaining structured data in JSON format without manual input. The main purpose is the automation of KYC/KYB, invoice processing, and document verification.
Vertex AI API — designed for creating, training, and deploying artificial intelligence models. It enables the use of ML for analysis, scoring, anomaly detection, and forecasting. The main purpose is the implementation of custom AI logic: from anti-fraud solutions to personalized recommendations.
Integration of Document AI and Vertex AI in your project: step by step
1) Create a Google Cloud Project
If the project has not yet been created, add it in Google Cloud, set up billing, and create a Service Account with access rights to the necessary services.
Link:
Enable the two main services:
- Document AI API
- Vertex AI API
Next, you need to configure Document AI so that the system correctly reads the documents.
- Create a Processor of the type ID Document Processor (suitable for processing passports and driver’s licenses)
- Select the region in which you are operating (US or EU).
- After creation, you will receive a Processor ID. Copy it — it will be needed to make requests via the API.
Next, your website can have its own interface where users will upload documents. The formats can be: JPEG, PNG, PDF.
The working mechanism looks like this:
- Your website’s backend receives the file from the user.
- Then it sends this file to the Document AI API.
- In the request body, the file is transmitted in Base64 format.
Example of a request:
POST https://documentai.googleapis.com/v1/projects/{project_id}/locations/{location}/processors/{processor_id}:process
Document AI processes this data and returns it in JSON format:
- OCR text (recognized text from the document)
- Structured data: first name, last name, date of birth, document number, expiration date.
Example of a JSON response from Document AI
+ Entities:
! First Name: John (confidence 0.99)
! Last Name: Doe (confidence 0.98)
! Date of Birth: 1990-01-01 (confidence 0.97)
! Document Number: X1234567 (confidence 0.96)
! Expiry Date: 2030-12-31 (confidence 0.95)
What did we get in the JSON?
First Name: John
Last Name: Doe
Date of Birth: 1990-01-01
Document No: X1234567
Expiry: 2030-12-31
With the obtained data, you can already work and add it to the database. For example, you can save it in the client’s profile so that you no longer need to ask them to enter this information. But you don’t have to stop there.
Screenshot from the official Google Document AI service:
We can further process this data and perform verification. In practice, there are cases when AI does not recognize certain elements. For example, the response from Document AI may not include the last name, even though it is present in the document. This happens — sometimes AI models skip certain fields.
To avoid a situation where it seems everything is completed but in fact the data is missing, it is necessary to check whether all key fields are filled in. After receiving the entities from Document AI (first name, last name, date of birth, document number, expiration date), make sure that none of them are empty. If the system detects missing values, you can initiate a rescan of the document and fill in the missing fields.
- required_fields = ["first_name", "last_name", "date_of_birth", "document_number"]
+ for field in required_fields:
! if field not in extracted_data or not extracted_data[field]:
# raise ValueError(f"Missing required field: {field}")
Or for your service, it is important that the user is at least 18 years old. Otherwise, you cannot grant access to the service.
For example, you can check the date of birth (in the format YYYY-MM-DD) and ensure that the age is > 18 years (or another established threshold).
- from datetime import datetime
+ dob = datetime.strptime(extracted_data["date_of_birth"], "%Y-%m-%d")
! age = (datetime.now() - dob).days // 365
# if age < 18:
# raise ValueError("Client must be over 18.")
Up to this stage, you have mainly been verifying static data obtained using AI.
2) Using Vertex AI
But you can go even further and use the Vertex AI module, since up to this point you have only been working with Document AI for scanning and recognizing documents.
Screenshot from the official Vertex AI service:
For example, the next step is evaluating the client based on parameters. You may have additional data, such as IP addresses or countries from which you cannot register users due to internal policies or regulatory restrictions.
Sending data to Vertex AI for scoring:
- from google.cloud import aiplatform endpoint = aiplatform.
+ Endpoint(endpoint_name="projects/your-project/locations/us-central1/endpoints/123456789")
! response = endpoint.predict(instances=[{
! "document_number": "X1234567",
! "age": 32,
! "country": "UK",
! "upload_time": 2.5 }])
# print(response)
At this stage, Vertex AI already has all the data obtained from Document AI:
Data from the document (Document AI Output)
- First and last name (anomaly detection, duplicate accounts).
- Date of birth (for age restrictions and risk profile).
- Document number (uniqueness and pattern).
- Expiration date (validity check).
- Issuing country (high-risk countries).
But you also provide information that your system collects about the client. Below is a limited amount of information. It can be much more, or less, depending on the needs.
File metadata
- Upload time (suspicious time, for example, night).
- File format (JPEG, PNG, PDF)
- Number of upload attempts (sign of fraud).
User behavioral data
- Form filling speed (too fast → suspicion of a bot)
- IP address and geolocation (match with the document’s country)
- VPN or Proxy (sign of concealment).
The Vertex AI Endpoint system, which is deployed as an ML/AI model, analyzes the data and returns a prediction. This is not hardcoded logic, but a combination of data, an algorithm, and a statistical model that produces the result based on training.
For example, the response might look like this:
risk_score = 0.12.
Decision-making rules:
If risk_score < 0.2 → approve.
If 0.2 ≤ risk_score < 0.5 → review.
If risk_score ≥ 0.5 → reject.
Next, depending on the settings of your website or application, you display the result to the client, and the structured data is recorded in the company’s database (PostgreSQL, MySQL, Firestore, or something else).
You can also:
- Change the client’s status in the profile.
- Send push or email notifications.
This is an example of how a single AI model can be used to solve business tasks and accelerate processes for both the company and its clients.
AI models do not yet cover all real-life scenarios, but new solutions are emerging every month. Stay tuned for updates. What is already available can be effectively used in work. Everything is limited only by your needs and creativity.
Below are examples of AI models and ways to use them:
OpenAI (ChatGPT, GPT-4/4o)
- ChatGPT API – integration of AI chat into applications (support, automation).
- Assistants API – custom assistants for business tasks.
- Code Interpreter – analysis of data and Python scripts (financial analytics, dashboards).
Google Cloud AI (Vertex AI)
- Document AI – document parsing (KYC, contracts, statements).
- AutoML – building models without code (scoring, forecasts).
- AI Hub – ready-made models (fraud detection, credit scoring).
AWS AI Services
- Textract – OCR from PDFs (invoices, financial documents).
- Comprehend – text analysis (reviews, sentiment).
- SageMaker – training custom models (risk management, forecasts).
Microsoft Azure AI (Copilot)
- Document Intelligence – recognition of forms and reports.
- Azure OpenAI Service – GPT in the cloud for enterprise solutions.
Anthropic (Claude)
- Claude API – chat, text generation, data analysis (legal documents, compliance).
Fireblocks
- AI analytics – transaction monitoring, AML, fraud protection in crypto.
DocuSign AI
- Intelligent Insights – analysis of contracts and risks.
Salesforce Einstein AI
- Einstein GPT – sales forecasting, CRM automation.
Artificial intelligence has ceased to be just a trend and has become a real tool for business optimization. From automating customer verification to risk forecasting and service personalization — AI offers companies opportunities to save time, reduce costs, and improve accuracy. Examples such as Google Cloud with its Vertex AI and Document AI services show that implementing such solutions is no longer the prerogative of technology giants — it is available to companies of any size and industry. The key is to start with a clear strategy and the right set of tools.
Igor Nikolaiev, Technical Product Lead in Fintech and AI