Revolutionizing Small Business Finances: How Directeam Helped Lili Build an AI-Powered Accountant Chatbot with AWS Generative AI Technology

Meet Lili
Lili is a financial platform designed specifically for small businesses, offering a combination of advanced business banking with built-in accounting and tax preparation software.
By consolidating financial tools into a user-friendly interface, Lili streamlines and simplifies managing business finances and makes it an attractive solution for business owners seeking a centralized and efficient way to manage their financial operations.
The Challenge
Small business owners often prioritize running their operations over managing administrative tasks like financial recordkeeping and accounting. While professional accountants provide valuable expertise, their services can be prohibitively expensive for many small businesses. Additionally, accountants may not always be available when business owners need immediate answers, resulting in delayed decision-making and unanswered questions.
Recognizing this gap, Lili identified an opportunity to leverage advancements in large language models (LLMs) and generative AI to provide accessible, cost-effective financial advisory services. The challenge was to develop a solution capable of delivering accurate and tailored financial guidance on demand, empowering small business owners to manage their finances effectively without the burden of high costs or lack of timely support.
Lili chose AWS as the foundation for their solution due to its robust Generative AI capabilities and its comprehensive ecosystem of tools for building AI-driven applications. AWS provides access to a diverse range of foundation models through Amazon Bedrock, including industry-leading third-party models from providers like Anthropic, AI21 Labs, and Cohere, as well as powerful in-house models developed by AWS, such as Amazon Titan. This versatility gave Lili the flexibility to select the most effective models for their specific use case.
Another key factor in choosing AWS was the ability to seamlessly integrate the AccountantAI solution with Lili’s existing AWS infrastructure. Since Lili’s financial platform was already running on AWS, leveraging the same environment ensured seamless compatibility, simplified data workflows, and maintained a unified, secure architecture. This approach not only streamlined development but also allowed for easy scaling and maintenance of the solution in alignment with Lili’s overall business operations.
To bring their vision to life, Lili partnered with Directeam, an AWS Partner with extensive expertise in cloud solutions and Generative AI. Known for their proactive, customer-first approach, Directeam specializes in designing innovative, scalable, and cost-efficient architectures on AWS. Their experience working with AWS-native startups and their deep understanding of generative AI allowed Directeam to help Lili navigate the complexities of building a secure, intelligent financial assistant. By collaborating with Directeam, Lili successfully developed AccountantAI, empowering small business owners to manage their finances with confidence and ease.
The Solution
Lili’s AccountantAI chatbot is a groundbreaking tool designed to provide small business owners with real-time, personalized financial guidance. The solution leverages AWS Bedrock service to combine advanced Large Language Model RAG workflows with the security and scalability of AWS infrastructure. The architecture of the solution consists of two main components:
Ingestion Workflow
This offline process prepares the system to handle user queries. Lili created a curated dataset of financial questions based on common and real-world customer inquiries. These questions were transformed into vector embeddings using Amazon Titan Text Embeddings, which were securely stored in an in-memory vector database within Lili’s VPC. This foundational dataset enables the system to efficiently validate and process future queries.
Retrieval Workflow:
The retrieval workflow powers the chatbot’s real-time interactions. When a user submits a query, the system converts it into a vector embedding and performs a similarity search against the precomputed embeddings. If the query is validated as relevant and legitimate using guardrails, the system retrieves the most suitable pre-defined prompt template, augments it with real-time financial data, and sends it to Anthropic’s Claude 3 Haiku model to generate a tailored response. This ensures users receive accurate, context-specific advice.
Steps to Achieve the Solution
- Assessment of AWS as the Go to Platform
Lili and Directeam evaluated AWS as the foundation for the solution. AWS was selected for its robust Generative AI capabilities, such as Amazon Bedrock, which offers access to cutting-edge models like Anthropic Claude and Amazon Titan Embeddings. Directeam advised on how AWS’s flexibility, security, and comprehensive toolset could meet Lili’s needs. - Designing the Solution Architecture
Directeam worked closely with Lili to design the ingestion and retrieval workflows in alignment with AWS best practices for cloud-native solutions. They focused on securely processing data using AWS PrivateLink and ensuring the workflows operated efficiently and reliably within Lili’s VPC. This included setting up the ingestion pipeline to transform curated financial questions into vector embeddings and building a retrieval system to handle real-time query processing with guardrails for question validation and pre-configured prompt templates for context enrichment. - Model Selection and Optimization
The right model was critical to balancing quality, performance, and cost. Directeam helped evaluate available models on Amazon Bedrock, leading to the adoption of Anthropic’s Claude 3 Haiku, which provided superior accuracy, faster response times, and cost-efficiency.
The Results
Through the collaboration between Lili and Directeam, the AccountantAI chatbot has successfully launched and transformed how small business owners access financial advice.
Since its launch, AccountantAI has answered thousands of financial, tax, and accounting queries, empowering small business owners to make informed decisions without the need for expensive professional accountants. This mutual effort not only enhanced Lili’s value proposition but also set a new standard for innovation in AI-driven financial services.