Published
Jul 26, 2024
Updated
Jul 30, 2024

REAPER: An AI That Plans How Other AIs Think

REAPER: Reasoning based Retrieval Planning for Complex RAG Systems
By
Ashutosh Joshi|Sheikh Muhammad Sarwar|Samarth Varshney|Sreyashi Nag|Shrivats Agrawal|Juhi Naik

Summary

Imagine a retail chatbot that not only answers your questions but also figures out the best way to find those answers. That's what REAPER, a new AI from Amazon, is all about. Retrieval Augmented Generation (RAG) systems, which power many chatbots and virtual assistants, rely on retrieving information from massive databases. But like a disorganized library, finding the right information quickly can be a challenge. REAPER acts like a super-librarian, creating a plan for how to retrieve information. Instead of searching every database at once, REAPER analyzes your question and decides which sources are most relevant. This can involve multiple steps. For example, if you ask a chatbot about your past order, REAPER would first identify you and then look up your order details before answering the question. This 'reasoning-based retrieval planning' significantly speeds things up. Traditional systems often make several requests to the vast language models (LLMs) that drive AI. Each request takes precious seconds, adding up to a noticeable delay. REAPER reduces this latency by planning the whole retrieval process in one go using a smaller, faster LLM. It also uses this smaller LLM to create the exact commands to get specific information from other AIs and databases, which reduces errors and improves accuracy. Tests show REAPER is highly effective, achieving 96% accuracy in tool selection and 92% accuracy in generating the correct tool arguments. Compared to traditional methods, it's not only faster but also much easier to update. For example, if a retailer wants to add a new database for product returns, REAPER needs just a few examples to understand how to utilize it. Traditional methods would require retraining with huge amounts of data, costing time and resources. While focused on shopping assistants, REAPER's potential goes beyond retail. Any AI system that needs to retrieve information, from search engines to research assistants, could benefit from its smart planning abilities. REAPER highlights a critical evolution in AI: it's not just about making individual AIs smarter, but also about making them work together more efficiently. By planning how to search and reason, REAPER promises faster, smoother, and more informed conversations between humans and machines.
🍰 Interesting in building your own agents?
PromptLayer provides the tools to manage and monitor prompts with your whole team. Get started for free.

Question & Answers

How does REAPER's reasoning-based retrieval planning system work technically?
REAPER uses a smaller, faster LLM to create a comprehensive retrieval plan in a single pass. The system works through three main steps: First, it analyzes the incoming query to determine required information sources. Second, it generates specific commands (tool arguments) for accessing these sources with 92% accuracy. Finally, it executes the retrieval plan sequentially, selecting appropriate tools with 96% accuracy. For example, when handling a customer's order query, REAPER would first plan to access customer identification, then order database, creating exact commands for each step - all before beginning the actual retrieval process. This approach significantly reduces the multiple back-and-forth requests typical in traditional RAG systems.
What are the main benefits of AI planning systems for everyday businesses?
AI planning systems help businesses streamline their operations by intelligently organizing and executing tasks. These systems can automate complex decision-making processes, reduce response times, and improve accuracy in customer service interactions. For example, in retail, they can coordinate multiple databases and systems to quickly answer customer queries about orders, returns, and inventory. The key advantage is adaptability - businesses can easily add new features or databases without extensive retraining. This makes AI planning systems particularly valuable for growing companies that need to scale their operations while maintaining efficiency and customer satisfaction.
How is AI changing the future of customer service?
AI is revolutionizing customer service by making interactions faster, more accurate, and more personalized. Modern AI systems can understand complex queries, access multiple information sources, and provide coherent responses in seconds. They're becoming increasingly sophisticated at handling multi-step requests, like checking order status, processing returns, or providing product recommendations. The technology is particularly valuable for businesses because it can operate 24/7, handle multiple customers simultaneously, and easily adapt to new services or products. This leads to improved customer satisfaction, reduced wait times, and more efficient use of human customer service resources.

PromptLayer Features

  1. Workflow Management
  2. REAPER's multi-step retrieval planning aligns with PromptLayer's workflow orchestration capabilities for managing complex RAG pipelines
Implementation Details
Create templated workflows that mirror REAPER's planning stages, incorporating version tracking for retrieval strategies and tool selections
Key Benefits
• Reproducible multi-step RAG workflows • Versioned retrieval planning templates • Coordinated tool selection and execution
Potential Improvements
• Add visual workflow builder for retrieval plans • Implement automated workflow optimization • Enhanced tool integration framework
Business Value
Efficiency Gains
30-50% reduction in workflow development time through reusable templates
Cost Savings
Reduced API costs through optimized retrieval planning
Quality Improvement
Higher consistency in RAG system outputs through standardized workflows
  1. Testing & Evaluation
  2. REAPER's 96% tool selection accuracy and 92% argument generation accuracy requirements align with PromptLayer's testing capabilities
Implementation Details
Set up automated testing pipelines to validate retrieval plan accuracy and tool selection performance
Key Benefits
• Continuous accuracy monitoring • Automated regression testing • Performance benchmarking across versions
Potential Improvements
• Add specialized RAG metrics • Implement retrieval plan validation tools • Create tool selection accuracy dashboards
Business Value
Efficiency Gains
40% faster system validation through automated testing
Cost Savings
Reduced debugging time through early error detection
Quality Improvement
Maintained high accuracy levels through continuous testing

The first platform built for prompt engineering