LLMs
It will be helpful to learn the power and functionalities of LLMs, so you can understand how your product can leverage them. By the end of this lesson, you should be able to understand the different ways you can customize LLMs to fit your needs.
LLM Functionalities
In understanding what AI can and can’t do, and how to turn your AI product into reality, it’s very useful to understand the different custom AI options that are currently available. The following is a brief summary of the current functionalities that llms can be used for, and how they can be used.
Understanding what AI is good at vs. not will help you save time and money!
LLM Customization and How it Works
Prompting.
This is the most basic functionality of LLMs. You give them a prompt, and they generate a response. Luckily the best LLMs are already pretty good so you can get a way with just just using prompting!
Fine-tuning.
Chatbots are quite general since they answer questions and prompts for very broad tasks and formulate their answers based on all the data they were trained on. For a specific application, . Imagine having a chatbot that can do a custom task very well.
RAG.
Imaginge you’re building an application that needs to answer specific questions using documents or data from an internal company database. You can use RAG to allow the LLM to answer questions based on data retrieved only from your internal database. These databases can be anything ranging from the documents on your own computer to a large internal company database.
Fine-tuning + RAG.
Agents.
Custom ML Models.
Below is a table that summarizes the different ways you can customize LLMs, and some different use cases for each.
Concept | Definition | Use Cases |
---|---|---|
Prompting | Crafting and optimizing input text to guide an AI model’s response. | Chatbots, content creation, code generation, data extraction. |
Fine-Tuning | Training a pre-existing AI model on a smaller, domain-specific dataset to improve its performance. | Customer support bots, legal/medical AI assistants, AI-powered tutoring. |
Retrieval-Augmented Generation (RAG) | Combining information retrieval with text generation to enhance accuracy and reduce hallucinations. | AI assistants with real-time data, research summarization, enterprise AI applications. |
Agents | Autonomous AI systems that make decisions, take actions, and interact dynamically. | AI-powered assistants, workflow automation, code generation, market research bots. |
Custom Machine Learning Models | Designing, training, and deploying models tailored to specific use cases instead of using pre-built solutions. | Fraud detection, recommendation systems, medical diagnostics, financial analysis. |
Now that you know the different functionalities, it is helpful to understand the tradeoffs in using each. The following table summarizes the tradeoffs (i.e. how complex it is to implement, the amount of data/compute required, the cost, the complexity, etc.).
Comparing LLM Functionalities
Method | Basic Functionality | Complexity | Data/Compute Req | Price | Customizability | Business Use Cases | Implementation Effort |
---|---|---|---|---|---|---|---|
Prompting LLM | Generate responses with carefully crafted prompts; fast, low effort. | ★☆☆☆☆ | ★☆☆☆☆ | $ | ★☆☆☆☆ | General-purpose use: quick tasks, chatbots, content generation, brainstorming ideas. | LO |
Fine-Tuned LLMs | LLM is tailored to specific tasks or domains by training on additional data. | ★★☆☆☆ | ★★★★☆ | $$ | ★★★★☆ | Domain-specific tasks: customer support, technical writing, product recommendations, research assistance. | MED |
LLM with RAG | Combines LLM outputs with retrieval from external data sources for real-time knowledge. | ★★★☆☆ | ★★★☆☆ | $$ | ★★★★☆ | Knowledge-intensive tasks: legal queries, medical diagnostics, enterprise data retrieval, personalized recommendations. | MED |
LLM Agents | Use LLMs for multi-step reasoning and orchestration across tools/APIs. | ★★★★☆ | ★★★★☆ | $$$ | ★★★★☆ | Complex automation: customer workflows, advanced research, multi-step decision-making, API orchestration. | MED |
Custom ML Models | Fully tailored model built from scratch for a specific task or domain. | ★★★★★ | ★★★★★ | $$$$$ | ★★★★★ | Highly specialized tasks: fraud detection, unique domain applications, proprietary systems, custom business logic. | HIGH |
Practice Problems:
- Would an app that _______. Which kind of LLM functionality should we use and why?
- Suppose we want to build a product that _______. Which kind of LLM functionality would we use and why?
- Imagine we want to build a product that _______. Which kind of LLM functionality would we use and why?
🚧 Content Under Construction 🚧
Please be patient while we work to bring this content to you soon!