# Trillo Doc AI Architecture

Trillo Doc AI processes documents using Large Language Models (LLMs) and Document AI processors. It reads the content of documents using OCR or libraries such as PDF libraries. It classifies each document using an LLM-based classifier. Based on the classification, it uses a processor to extract structured data from the content or processes it as a text document.

Text documents are summarized, chunked, and converted to vectors (text embeddings). These vectors are stored in a vector database for semantic matching.

### Generic Architecture



<figure><img src="https://lh7-us.googleusercontent.com/QxMa7p0EKg2eLtKcX2Njlp04TXLCn6b2M9UQpCs9hbADjUNP1Z1IC0GVp25txsvNQUyFF4inMxVrtmFd_oLopNZEy9gf0xtAj3sDCvzz0x7eud5XiWqbL7Zn6exWePPVt9U82EMiFaVGCEIGrnK4loI" alt=""><figcaption></figcaption></figure>



### Trillo Doc AI on GCP for Document Processing

<figure><img src="https://lh7-us.googleusercontent.com/lsynqCb15Kh2mVEmw1umXaaWrE_pZLItUD3lOzuf3OO03R5Jc7ivFNm7a6bqj0KVtfSjto789KBVf6enMhAvodF_1m7mubJ5lhpxax0kHGKIPZ2f5P7IRWqj-5NaWjMQASxklOzPcczZJOGW8SVTWE4" alt=""><figcaption></figcaption></figure>

Trillo Doc AI processing pipeline is a specific implementation of the generic document processing pipeline using GCP services such as Google Vertex AI (which includes Gen AI, LLMs APIs), Google Document AI (NLP based parsers for forms, tables, purchase orders, invoices, etc.), AlloyDB (vector database), Cloud SQL (managed relational database), Google Cloud Storage for buckets.
