Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

DeepLearning.AI

Prompt Compression and Query Optimization

DeepLearning.AI via Coursera

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
This course focuses on integrating traditional database features with vector search capabilities to optimize the performance and cost-efficiency of large-scale Retrieval Augmented Generation (RAG) applications. You’ll learn how to apply these key techniques: 1. Prefiltering and Postfiltering: These are techniques to filter results based on specific conditions. Prefiltering is done at the database index creation stage, while postfiltering is applied after the vector search is performed. 2. Projection: This technique involves selecting a subset of the fields returned from a query to minimize the size of the output. 3. Reranking: This involves reordering the results of a search based on other data fields to move the more desired results higher up the list. 4. Prompt Compression: This technique is used to reduce the length of prompts, which can be expensive to process in large-scale applications. You’ll also learn with hands-on exercises how to: 1. Implement vector search for RAG using MongoDB. 2. Develop a multi-stage MongoDB aggregation pipeline. 3. Use metadata to refine and limit the search results returned from database operations, enhancing efficiency and relevancy. 4. Streamline the outputs from database operations by incorporating a projection stage into the MongoDB aggregation pipeline, reducing the amount of data returned and optimizing performance, memory usage, and security. 5. Rerank documents to improve information retrieval relevance and quality, and use metadata values to determine reordering position. 6. Implement prompt compression and gain an intuition of how to use it and the operational advantages it brings to LLM applications. Start optimizing the efficiency, security, query processing speed, and cost of your RAG applications with prompt compression and query optimization techniques.

Syllabus

  • Prompt Compression and Query Optimization
    • This course focuses on integrating traditional database features with vector search capabilities to optimize the performance and cost-efficiency of large-scale Retrieval Augmented Generation (RAG) applications.You’ll learn how to apply these key techniques: 1. Prefiltering and Postfiltering: These are techniques to filter results based on specific conditions. Prefiltering is done at the database index creation stage, while postfiltering is applied after the vector search is performed. 2. Projection: This technique involves selecting a subset of the fields returned from a query to minimize the size of the output. 3. Reranking: This involves reordering the results of a search based on other data fields to move the more desired results higher up the list. 4. Prompt Compression: This technique is used to reduce the length of prompts, which can be expensive to process in large-scale applications.You’ll also learn with hands-on exercises how to: 1. Implement vector search for RAG using MongoDB. 2. Develop a multi-stage MongoDB aggregation pipeline. 3. Use metadata to refine and limit the search results returned from database operations, enhancing efficiency and relevancy. 4. Streamline the outputs from database operations by incorporating a projection stage into the MongoDB aggregation pipeline, reducing the amount of data returned and optimizing performance, memory usage, and security. 5. Rerank documents to improve information retrieval relevance and quality, and use metadata values to determine reordering position. 6. Implement prompt compression and gain an intuition of how to use it and the operational advantages it brings to LLM applications.Start optimizing the efficiency, security, query processing speed, and cost of your RAG applications with prompt compression and query optimization techniques.

Taught by

Richmond Alake

Reviews

Start your review of Prompt Compression and Query Optimization

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.