ADaSci Banner 2024

No-Code Approach for Building Agentic RAG using RAGapp

Implement Agentic RAG with RAGapp: no-code, an agent-based framework for multi-step reasoning using Docker.

Agentic RAG stands for an AI agent-based RAG implementation which involves an agent-based framework specifically designed for multi-step reasoning and being able to work with external tools. The agent figures out which tools are necessary, retrieves relevant information from data sources and generates a response tailored to the needs of the user. The agent can leverage contextual understanding to ensure the answer aligns with the broader conversation and might use post-generation verification techniques to ensure the generated information is accurate. 

This article explores the no-code approach for building agentic RAG using RAGapp based on Docker deployment. 

Table of Content

  1. Understanding Agentic RAGs 
  2. Types of Agentic RAG
  3. Deploying RAGapp using Docker

Understanding Agentic RAGs

Agentic RAGs employ the use of a retrieval-augmented generation framework which is used to create responses for AI systems by retrieving relevant information from different sources and then using that information to generate a response tailored to the user query. The agentic concept here refers to the addition of agents into the RAG system. These agents act as intelligent orchestrators, managing different parts of the system and making decisions about how to respond to a user query. The agentic RAG operates using the following: 

User Query – The user queries the system. 

Agent Takes Charge – The agentic RAG agent receives the user query and analyses it. 

Decision Making – The agent figures out the best course of action. 

Information Gathering – The agent retrieves relevant information based on its decisions. 

Response Generation – The agent uses the retrieved information to generate a response that’s specific to the user query. 

Types of Agentic RAG

The different categories of RAG-based agents depend on their functionalities and capabilities: 

Routing Agent – The routing agent analyses the user query to understand and choose the downstream RAG pipeline. In other words, based on the analysis, the routing agent decides which sub-pipeline within the larger RAG system is best equipped to handle the user query. 

One-shot Query Planning Agent – In query planning, the user query is broken into smaller subqueries, and then each subquery is run against the relevant RAG pipeline and their results are combined to create a final response. 

Tool Use Agent – A tool use agent helps in situations when data needs to be collected from an external API (database or application) for additional context before the user query is sent to LLM for processing. 

ReAct Agent – It provides a structured approach where the agent analyses the user query to understand the context and then based on this reasoning, the agent takes action. It employs a combination of routing, query planning and tool use agents into one single agent entity. It’s one of the most widely used agent categories. 

Dynamic Planning and Query Agent – This agent incorporates a more flexible approach in terms of planning and adapting its information retrieval strategy. The dynamic planning agent can assess the retrieved information and determine if the information is sufficient. The agent continues an iterative process of information gathering, evaluation and adaptation until it has retrieved relevant information to address the user query. 

Deploying RAGapp using Docker

RAGapp is a no-code tool for implementing and using agentic RAGs. RAGapp employs the use of docker for deploying RAG applications locally or based on cloud infrastructure without worrying about any UI creation or code writing. Let’s deploy no-code RAGapp for using Agentic RAG: 

Initial Requirements – Docker Desktop or CLI

Step 1 – RAGapp’s official Docker image is available on Docker Hub 

Download and run the RAGapp Docker image using the command: 

docker run -p 8000:8000 ragapp/ragapp

Alternatively, users can also use the Docker Hub’s GUI for pulling and running the image. 

Step 2 – Once the docker image is downloaded and executed, use http://localhost:8000/admin to access the admin UI of RAGapp. 

Step 3 – Configure the RAGapp with the model provider, API key and model name as required. RAGapp allows OpenAI, Gemini, Azure and Ollama model providers to deploy agentic RAGs on their models. 

Step 4: Configure the RAG with custom prompts. User can setup custom system message for prompt template here.

Step 5: Agent config and knowledge base can also be set up as agent tools for accessing external data. 

Step 6: Query the agent based on external data and check the events for more details. 

The query gave an accurate response using the external data with source citations. 

Final Words

Agentic RAGs represent a significant development in the discipline of AI. RAGapp is one tool that can assist users in building and working with agentic RAG without any prior knowledge or expertise in programming. The UI of RAGapp is also user-friendly, allowing for faster implementation and usability. 

References

  1. RAGapp Official Github Repo
  2. LlamaIndex Documentation on Agentic Strategies
  3. Agentic RAG using LlamaIndex

Learn more about RAG and its implementations through our hand-picked courses shown below:

Picture of Sachin Tripathi

Sachin Tripathi

Sachin Tripathi is the Manager of AI Research at AIM, with over a decade of experience in AI and Machine Learning. An expert in generative AI and large language models (LLMs), Sachin excels in education, delivering effective training programs. His expertise also includes programming, big data analytics, and cybersecurity. Known for simplifying complex concepts, Sachin is a leading figure in AI education and professional development.

The Chartered Data Scientist Designation

Achieve the highest distinction in the data science profession.

Elevate Your Team's AI Skills with our Proven Training Programs

Strengthen Critical AI Skills with Trusted Generative AI Training by Association of Data Scientists.

Our Accreditations

Get global recognition for AI skills

Chartered Data Scientist (CDS™)

The highest distinction in the data science profession. Not just earn a charter, but use it as a designation.

Certified Data Scientist - Associate Level

Global recognition of data science skills at the beginner level.

Certified Generative AI Engineer

An upskilling-linked certification initiative designed to recognize talent in generative AI and large language models

Join thousands of members and receive all benefits.

Become Our Member

We offer both Individual & Institutional Membership.