Nandan Mullakara | AI Digital AutomationSharing the best AI and Automation strategies and tips | Founder Bot Nirvana
Emerging LLM Architecture You Should Know About
In the rapidly evolving world of technology, Large Language Models (LLMs) are becoming the cornerstone of all new AI applications. To enable the use of this powerful new technology for rapid app development, a multi-layered LLM architecture is emerging.
In this post, we'll dive into the multi-layered structure of LLM applications, exploring each component's role and the orchestration required for seamless performance.
Here is a view of the emerging LLM App stack (Source A16z)
#LLMArchitecture #LLM #GenAI #VectorDatabases #Orchestration
From data pipelines to app hosting, let's dive into the intricate world of LLM architecture.
Data Pipelines
Data pipelines form the backbone of LLM applications, seamlessly managing data ingestion and transformation. They connect various sources, ingesting contextual data to feed into the LLM ecosystem.
- Ingestion: Connects diverse data sources, ensuring a continuous flow of contextual information.
- Transformation: Prepares and channels data for optimal use in LLM applications.
- Tools: Notable examples include Databricks, Airflow, and Unstructured.
Embedding Models
Embedding models transform data into a format that LLMs can understand, usually converting textual data into vectors.
- Data Transformation: Converts complex contextual data into a more manageable, mathematical format.
- Efficiency: Enables easier storage and computation, forming a bridge between raw data and AI processing.
- Tools: Prominent tools include OpenAI, Cohere, and Hugging Face.
Vector Databases
Vector databases store and manage the vector data generated by embedding models, crucial for the efficient operation of LLMs.
- Storage and Management: Specialized in handling vector data for easy retrieval and management.
- Querying Efficiency: Enhances the speed of data retrieval, crucial for real-time applications like chatbots.
- Tools: Examples include Pinecone, Weaviate, ChromaDB, and pgvector.
Playground
The playground environment is where AI prompts are iterated and tested, a vital step before full integration.
- Iteration and Testing: Allows for the fine-tuning of LLM prompts, ensuring they perform as intended.
- Optimization: A critical step for enhancing the overall performance and accuracy of LLM applications.
- Tools: Tools in this category include OpenAI and Humanloop.
Orchestration
Orchestration layers manage the coordination of various components and workflows within the LLM application.
- Coordination: Manages the intricate interactions between different components and workflows.
- Abstraction and Memory Management: Simplifies complex processes like prompt chaining and maintains continuity across multiple LLM interactions.
- Tools: Langchain, LlamaIndex, Flowise, and Langflow are notable examples.
APIs/Plugins
APIs and plugins extend the functionality of LLM applications, allowing them to interact with external tools and services.
- Interoperability: Enhances the ability of LLM apps to work with various external resources and services.
- Functionality Enhancement: Extends the capabilities of LLM applications, offering more versatile uses.
- Tools: Examples include Serp, Wolfram, and Zapier.
LLM Cache
The LLM Cache is a critical component for enhancing the speed and responsiveness of LLM applications.
- Speed and Accessibility: Stores frequently accessed data, reducing load times and improving overall performance.
- Reduced Latency: Enhances user experience by minimizing delays in data retrieval.
- Tools: Key tools include Redis, SQLite, and GPTCache.
Logging/LLM Ops
Logging and LLM Operations are essential for maintaining the health and performance of LLM applications.
- Monitoring and Tracking: Keeps a detailed log of application performance and system health.
- Proactive Issue Resolution: Helps in quickly identifying and addressing potential issues, ensuring smooth operation.
- Tools: Notable tools for this purpose are Weights & Biases, MLflow, PromptLayer, and Helicone.
Validation
Validation frameworks play a pivotal role in ensuring the output quality and reliability of LLM applications.
- Output Quality Control: Acts as a checkpoint to maintain the integrity and reliability of the application.
- Corrective Actions: Offers mechanisms to rectify any deviations or errors in the output.
- Tools: Examples include Guardrails, Rebuff, Microsoft Guidance, and LMQL.
App Hosting
App Hosting is the final layer in the LLM application architecture, crucial for deployment and accessibility.
- Deployment and Accessibility: Hosts the LLM application, making it accessible to end-users.
- Scaling and User Management: Provides the infrastructure necessary for scaling and managing user access.
- Tools: Platforms like Vercel, Steamship, Streamlit, and Modal are key in this area.
Conclusion
From data pipelines to orchestration, each component plays a pivotal role in the smooth functioning and scalability of these AI powerhouses.
As we continue to explore and innovate in this field, the architecture of LLM applications will undoubtedly evolve, offering even more possibilities for the future of AI technology.
👍
2❤️
👍
💡
👏
😂
Explore More Posts
5 Robotic Process Automation Use Cases You Should Know About
There are specific Robotic Process Automation use cases that work best within a particular business function or Industry. It is best to stick to use cases that are well-defined, involve a lot of manual effort and has worked well in the past. Robotic Process Automation Use CasesChoosing the wrong Robotic Process Automation (RPA) use cases has been one of the major reasons for failed Automation initiatives. We now have a database of processes that are fit for RPA. It is advisable to stick to the proven RPA processes. Here are a few use cases from the database categorized by business function. Finance and Accounting RPA Use CasesRPA can fully automate 42 percent of the F&A tasks, as per a McKinsey study. Note that it says “fully” automate these tasks. Another 19% of the tasks can be mostly automated, per the same study.
Invoice processing: Capture invoice data from scanned invoices or electronic files and process the same in ERP systems. The invoice processing time can be reduced by up to 60 to 80%.
Payment matching & processing: Bank lockbox payments received from various sources are matched against open invoices. These are then processed in the ERP system, and remittance receipts are generated.
Automate journal entries: RPA can process emails, perform compliance checks and process the Journal entries in ERP (SAP, Oracle, etc.), and notify the requestor.
Account reconciliations: RPA can automate the download of sub-account balances, perform validations and create balancing journal entries to handle discrepancies
3-way matching: Matching invoices to purchase orders (PO) and goods received notes (GRN) can be automated with RPA. This ensures accurate payment and validates different parts of the supply chain.
Vendor Onboarding: Look up new Vendor information online (e.g. using the DUNS number) and use that information to add the new vendor to your ERP of Invoice application.
Automate workflow and approvals: The AP system can configure RPA for rules-based auto-approval. Any exceptions are raised to the appropriate person for manual approval.
Financial planning and analysis: Prepare forecasts automatically using historical and market data. Load pre-populated balances into the planning system, Create variance reports
Regulatory reporting: Capture and cleanse data, and generate the regulatory reports automatically. Create complex annual reports to the extent possible.
Read more about RPA in Finance and Accounting here. Human Resources RPA Use CasesMore than 50% of standard HR processes can be automated, according to Deloitte. When the survey was done with Shared service leaders, about 74% planned to investigate RPA.
Employee Onboarding: HR teams can assimilate new employees into the organization faster and better with RPA. You can automate most of the onboarding tasks, including receiving information and paperwork from new hires, setting up access to systems, and notifying those concerned.
Employee Offboarding: Just like Onboarding, all the tasks to offboard an employee, such as removing access to systems, notifying people concerned, and creating standard paperwork, can be automated.
Employee data management: RPA can be used to perform many of the Employee data administration tasks. This includes adding and updating data on current and past employees, contractors, interns, etc.
Recruitment Management: RPA can be used for most repetitive recruitment tasks, such as scouring websites for candidates and screening the resumes received. RPA systems can work 24 x 7 to source, screen, and organize the right candidates for you.
Compensation Management: RPA can be used to input employee compensation data into the Talent Management System.
Time record validation: Following up on missing timesheets, validating time booked, and notifying users of any discrepancies.
Earnings and Deductions: Initiate batch creation and imports into the payroll system, and complete the standard validations.
Payroll payments: With RPA, the bot automatically extracts data from an input source such as an MS Excel file or an email and enters the Payroll payment data into the banking application.
Automating process hand-offs: Typical approaches to handing work between functions and people can be inefficient, time-consuming, and error-prone. RPA can link both automated and manual HR tasks into an end-to-end workflow
Learning and development administration: Review employee certification status against requirements. Notify employee-manager and ensure compliance with certification requirements.
Customer Service RPA Use CasesRobotic Process Automation use cases can be used to automate many of the common tasks at your support desk. Attended automation is useful for the Service desk agents. So, the tasks can be initiated by a rep by clicking a mouse. They can also invoke unattended automation through a web portal, email, or SMS.
Customer Management: Agents can quickly add or update customer records with RPA. They can also update the details on other systems with a mouse click.
Update CRM: RPA can automate the process of sending the Sales & Order information from ERP to CRM and notify the salesperson
Access Management: RPA can be used to validate identity, unlock accounts, reset password credentials, and pass it back to users.
User Administration: RPA can create new accounts across multiple systems and applications.
Incident/Change Management: RPA can raise incidents/change requests by creating and/or updating tickets. These tickets can be created from email or can also be auto-created with inputs from monitoring systems.
Progress Chasing: RPA can follow up on incidents with users and report the progress on tickets to the concerned.
Update or Close Tickets: RPA can close tickets after follow-up if the users indicate the incident has been resolved or if there is no response after repeated follow-up.
External and Internal Interfaces: RPA can be used to drive actions in external systems (supplier, partner, or customer) or even internal systems with a non-disruptive integration.
Information Technology RPA Use CasesInfrastructure support in IT is one of the areas that can be automated extensively with RPA and other technologies. IT can also use both unattended and attended automation to automate manual tasks.
Database Administration: Repetitive tasks such as database validation, extending tablespaces, clearing database locks, etc.
System Administration: Sysadmin activities, including scheduled tasks and interventions using management tools
Backup Management: Monitor backup jobs, run diagnostics, restart jobs, or alert the support team
Patch Management: Check the patch levels, Schedule, execute and validate patching using tools and scripts.
Daily Checks. Automate all manual system and application checks. Eg. SAP ERP daily checks.
Provisioning: Perform server, storage, and network provisioning actions.
Network Support: Monitor and manage LAN, WAN devices, load balancers, firewalls, and other network technologies
Test Automation. RPA can be used to automate manual testing efforts, user acceptance testing, and load testing.
Automate SLA Reports: Capture data from end devices like router logs, system logs, or ticketing logs and use that data to calculate the SLAs.
Batch job monitoring: Automate the batch monitoring of most of the legacy systems – Mainframe and AS400 systems. Bots log in to the system and access the information from schedulers to check the job status and send the status to the distribution list.
Sales and Marketing RPA Use CasesMore than 30% of the sales activities can be automated as per Cross-functional research by McKinsey. But, only 25% of the companies have even one sales process automated, as per the same research.
Customer journey optimization: Create an end-to-end online ordering, tracking, and query management process. This can help increase customer satisfaction and improve throughput.
Update CRM:Maintain your CRM like Salesforce and run an error check with other applications like an ERP. The activities that can be automated include:
Process of registering new customers and new deal wins
Process of sending the Sales & Order information from ERP to CRM and notifying the salesperson
Data entry of Customer quotes, Order tracking, and Shipment tracking into CRM.
Proposal generation: Reduce the time to draft requests for proposals (RFPs) with NLP (AI) and RPA. The RFP questions are automatically decoded, and the proposed responses are collated in a proposal draft.
Social media monitoring: Track and respond to the sentiments expressed by customers and enthusiasts on Social media like Twitter, Facebook, Instagram, etc.
Competitive Intelligence & Price Monitoring: Automatically collect, process, and deliver competitive product and pricing intelligence from the web—at regular intervals or on demand. Use this near-real-time business intelligence to support dynamic product pricing that helps you grow sales.
Enhanced Sales Intelligence: Automatically acquire data from any website and integrate it with internal systems like CRM, giving your sales team the lead generation tools and prospecting information they need when they need it.
External Website Updates: Automate the process of accessing and logging information into external websites and portals. This can be scheduled to automatically update the external website at periodic intervals.
Automate Rewards and Gifts: Automatically ship rewards based on your rewards system. It can also monitor special days like Anniversaries and send out gifts
These are some Robotic Process Automation use cases or examples that work well within some of the business functions.
What Is Intelligent Automation And What Can It Do?
Since robotic process automation and other forms of automation caught people's imagination, there have been efforts to go beyond the limited rule-based automation. Intelligent Automation (IA) is one of the terms used to describe new and enhanced automation by adding AI technologies. In this post, we will dive deeper into Intelligent Automation and review real-world examples to help you understand what intelligent automation can do for you. Let's start with a quick introduction to Intelligent Automation. What is Intelligent AutomationUsually, anything with Artificial Intelligence (AI) is considered intelligent or smart. For example, Intelligent ERP is AI combined with ERP. Let's take the example of SAP. They call SAP S4 / HANA with embedded AI as an Intelligent ERP. So you guessed it—AI plus Automation is generally called Intelligent Automation. Now, automation itself can use many technologies. The usual contenders include Robotic process automation (RPA) and Digital process automation (DPA). It can also be other Low-code or No-code automation technologies. You can even use code-based automation like Python! Even the AI technologies used for automation come in different flavors. For example, it can be Machine learning (ML), Natural language processing (NLP), Computer vision (CV), and more. So, there you have it—various Automation and AI technologies combine to form Intelligent Automation. But do we have a clear-cut definition? Intelligent Automation definitionThere are a few definitions of Intelligent Automation terms from various sources, including IEEE 2755. Here is a definition from the Intelligent Automation book: IA, also called Hyperautomation, is a concept leveraging a new generation of software-based automation. It combines methods and technologies to execute business processes automatically for knowledge workers. This automation is achieved by mimicking knowledge workers' capabilities in performing their work activities (e.g., language, vision, execution, and thinking & learning). The goal of using IA is to achieve a business outcome, through a redesigned automated process, with no or minimal human intervention. As a result, IA increases process speed, reduces costs, enhances compliance and quality, increases process resilience, and optimizes decision outcomes. Ultimately, it improves customer and employee satisfaction and boosts revenues. As you can see, RPA is one of the technologies that enable Intelligent Automation. How do they differ? Intelligent Automation and RPAWhat is the difference between RPA and intelligent automation? Is RPA intelligent automation? No, RPA is NOT Intelligent Automation (IA), but RPA certainly has played a part in the evolution into IA or Hyperautomation. However, software-based automation is much more than RPA, AI, or any technology. Since Intelligent Automation, or RPA 4.0 as Everest calls it above, is mostly about adding AI to automation, what AI technologies are used for automation? AI Technologies in Intelligent AutomationHere are the key AI technologies currently used within automation:
Natural Language Processing: It helps to understand the meaning and intention of sentences through machine learning and statistical methods.
Computer Vision: This form of AI is used to extract, analyze and understand information from images, including scanned documents.
Machine Learning: These algorithms automatically improve "learn" to detect patterns and predict outcomes with the help of data.
NOW READ: Intelligent Automation Use Cases You Should Know About
Intelligent Automation Use Cases You Should Know About
AI technology can expand the scope of what companies can automate. Let's look at a few real-world examples to understand what we can do with Intelligent Automation. We'll get started with a common use case: Invoice Processing. Intelligent Automation Use Case ExamplesInvoice processingAs we know, in a manual invoicing process, customers receive an invoice from the supplier. The invoice is input into the accounting software generally using copy-paste. Then the invoice is sent for approval, and once approved, the payment is made. Automation tools like RPA can automate a significant part of this process. RPA can extract the invoice data and verify the invoices. It can then input the data into the accounting system for approvals and payment. Since RPA is rule-based, its data extraction capability is quite limited. The computer must be told to look for a text anchor or a position and extract the required values. This is okay as long as we only have a few Invoice formats to process. In the real world, though, there are many formats that each customer receives. For example, one of my customers has got 4000 plus formats. So, it becomes tedious to do this rule-based mapping for each invoice. Instead, what if the machine could learn the mapping by itself? That's what artificial intelligence for AI enables. It uses a combination of AI techniques to map the fields. The AI techniques include computer vision (CV) and Machine learning (ML). The AI extracts the data and presents its mapping to us. We can then correct the mappings it could not get right. It learns in the process and improves over time. AI thus does a bulk of the work rather than you mapping each template one by one. Once AI does the bulk of the work, we can combine that AI output with RPA for higher data extraction accuracy. RPA can also input this data into your accounting systems or ERP. So, as you can see, RPA, with added AI intelligence, improves automation quite a lot. AI can do more than this, as we'll see in our next Automation use case – Claims Processing. Claims ProcessingNext, we'll see how we can automate Vehicle claims with automation. Usually, after a vehicle accident, customers have to file a claim with damage details. This is a manual process that takes days to process. We can automate this process using Chatbots, RPA, and Google damage assessment API. A chatbot collects the claim details, including the damaged vehicle photographs. An RPA bot then matches the submission to policy details. It invokes a damage assessment API to assess the damage. Finally, it provides a claim number to the user via chat. We can see that with more AI capabilities, you can do more! We can string more AI and Automation tools to create more complex automation. We will look at one such use case next: Customer onboarding. Customer OnboardingLet's see how software-based automation can transform an Onboarding process. This is an example from the Intelligent automation book. When a customer is acquired, we can use Machine learning to segment them. We can then use a Chatbot to have customers provide their information. They usually submit a few documents which can be digitized with AI. RPA can help us check for any missing information and reach out to the customer to get that information. Once we have all the info, RPA can do background checks and use AI to detect fraud. Finally, we can monitor customer data for any churn risk. So we can see how Intelligent Automation (IA) can transform your customer onboarding process. This is just another example. You can use IA to change multiple functions in your organization.
Comments
Start the Conversation