Retrieval Augmented Generation (RAG) & LLM: Examples

Retrieval augmented Generation RAG pattern for LLMs

Last updated: 25th Jan, 2025 Have you ever wondered how to seamlessly integrate the vast knowledge of Large Language Models (LLMs) with the specificity of domain-specific knowledge stored in file storage, relational databases, graph databases, vector databases, etc? As the world of LLMs continues to evolve, the need for more sophisticated and contextually relevant responses from LLMs becomes paramount. Lack of contextual knowledge can result in LLM hallucination thereby producing inaccurate, unsafe, and factually incorrect responses. This is where question & context augmentation to prompts is used for contextually sensitive answer generation with LLMs, and, the retrieval-augmented generation method, comes into the picture. For data scientists and product managers keen …

Continue reading

Posted in Generative AI, Machine Learning, NLP. Tagged with , , .

How to Setup MEAN App with LangChain.js

mean app with langchain.js

Hey there! As I venture into building agentic MEAN apps with LangChain.js, I wanted to take a step back and revisit the core concepts of the MEAN stack. LangChain.js brings AI-powered automation and reasoning capabilities, enabling the development of agentic AI applications such as intelligent chatbots, automated customer support systems, AI-driven recommendation engines, and data analysis pipelines. Understanding how it integrates into the MEAN stack is essential for leveraging its full potential in creating these advanced applications. So, I put together this quick learning blog to share what I’ve revisited. The MEAN stack is a popular full-stack JavaScript framework that consists of MongoDB, Express.js, Angular, and Node.js. Each component plays …

Continue reading

Posted in agentic ai, LangChain, MEAN. Tagged with , , , .

Build AI Chatbots for SAAS Using LLMs, RAG, Multi-Agent Frameworks

ai powered chatbots for SAAS using LLM, RAG and Multi-agent frameworks

Software-as-a-Service (SaaS) providers have long relied on traditional chatbot solutions like AWS Lex and Google Dialogflow to automate customer interactions. These platforms required extensive configuration of intents, utterances, and dialog flows, which made building and maintaining chatbots complex and time-consuming. The need for manual intent classification and rule-based conversation logic often resulted in rigid and limited chatbot experiences, unable to handle dynamic user queries effectively. With the advent of generative AI, SaaS providers are increasingly adopting Large Language Models (LLMs), Retrieval-Augmented Generation (RAG), and multi-agent frameworks such as LangChain, LangGraph, and LangSmith to create more scalable and intelligent AI-driven chatbots. This blog explores how SaaS providers can leverage these technologies …

Continue reading

Posted in agentic ai, Large Language Models. Tagged with , .

Creating a RAG Application Using LangGraph: Example Code

building rag application using Langgraph

Retrieval-Augmented Generation (RAG) is an innovative generative AI method that combines retrieval-based search with large language models (LLMs) to enhance response accuracy and contextual relevance. Unlike traditional retrieval systems that return existing documents or generative models that rely solely on pre-trained knowledge, RAG technique dynamically integrates context as retrieved information related to query with LLM outputs. LangGraph, an advanced extension of LangChain, provides a structured workflow for developing RAG applications. This guide will walk through the process of building a RAG system using LangGraph with example implementations. Setting Up the Environment To get started, we need to install the necessary dependencies. The following commands will ensure that all required LangChain …

Continue reading

Posted in agentic ai, LangChain, Large Language Models, RAG. Tagged with , , , .

Building a RAG Application with LangChain: Example Code

Building a RAG application using LangChain Framework

The combination of Retrieval-Augmented Generation (RAG) and powerful language models enables the development of sophisticated applications that leverage large datasets to answer questions effectively. In this blog, we will explore the steps to build an LLM RAG application using LangChain. Prerequisites Before diving into the implementation, ensure you have the required libraries installed. Execute the following command to install the necessary packages: Setting Up Environment Variables LangChain integrates with various APIs to enable tracing and embedding generation, which are crucial for debugging workflows and creating compact numerical representations of text data for efficient retrieval and processing in RAG applications. Set up the required environment variables for LangChain and OpenAI: Step …

Continue reading

Posted in LangChain, Large Language Models, RAG. Tagged with , , .

Building an OpenAI Chatbot with LangChain

Building Custom OpenAI Chatbot using LangChain

Have you ever wondered how to use OpenAI APIs to create custom chatbots? With advancements in large language models (LLMs), anyone can develop intelligent, customized chatbots tailored to specific needs. In this blog, we’ll explore how LangChain and OpenAI LLMs work together to help you build your own AI-driven chatbot from scratch. Prerequisites Before getting started, ensure you have Python (version 3.8 or later) installed and the required libraries. You can install the necessary packages using the following command: Setting Up OpenAI API Key To use OpenAI’s services, you need an API key, which you can obtain by signing up at OpenAI’s website (OpenAI) and generating a key from the …

Continue reading

Posted in LangChain, Large Language Models, OpenAI. Tagged with , , .

How Indexing Works in LLM-Based RAG Applications

Indexing in RAG applications

When building a Retrieval-Augmented Generation (RAG) application powered by Large Language Models (LLMs), which combine the ability to generate human-like text with advanced retrieval mechanisms for precise and contextually relevant information, effective indexing plays a pivotal role. It ensures that only the most contextually relevant data is retrieved and fed into the LLM, improving the quality and accuracy of the generated responses. This process reduces noise, optimizes token usage, and directly impacts the application’s ability to handle large datasets efficiently. RAG applications combine the generative capabilities of LLMs with information retrieval, making them ideal for tasks such as question-answering, summarization, or domain-specific problem-solving. This blog will walk you through the …

Continue reading

Posted in AI, Generative AI, Large Language Models. Tagged with , .

What are AI Agents? How do they work?

how does AI agent work

Artificial Intelligence (AI) agents have started becoming an integral part of our lives. Imagine asking your virtual assistant whether you need an umbrella tomorrow, or having it remind you of an important meeting—these agents now help us with weather forecasts, managing daily tasks, and much more. But what exactly are these AI agents, and how do they work? In this blog post, we’ll break down the inner workings of AI agents using an easy-to-understand framework. Let’s explore the key components of an AI agent and how they collaborate to enable seamless interactions, such as providing weather updates or managing tasks efficiently. What are AI Agents? AI agents are artificial entities …

Continue reading

Posted in agentic ai. Tagged with .

Agentic AI Design Patterns Examples

agentic ai design patterns examples

In the ever-evolving landscape of agentic AI workflows and applications, understanding and leveraging design patterns is crucial for building effective and innovative solutions. Agentic AI design patterns provide structured approaches to solving complex problems. They enhance the capabilities of AI agents by enabling reasoning, planning, collaboration, and tool integration. For instance, you can think of these patterns as a blueprint for constructing a well-oiled team of specialists in a workplace—each with unique roles and tools, working in harmony to tackle a project efficiently and innovatively. Imagine a team of engineers collaborating on designing a new car, where one member focuses on aerodynamics, another on engine performance, and a third on …

Continue reading

Posted in agentic ai, Large Language Models. Tagged with , .

List of Agentic AI Resources, Papers, Courses

list of agentic ai resources and papers

In this blog, I aim to provide a comprehensive list of valuable resources for learning Agentic AI, which refers to developing intelligent systems capable of perception, autonomous decision-making, reasoning, and interaction in dynamic environments. These resources include tutorials, research papers, online courses, and practical tools to help you deepen your understanding of this emerging field. This blog will continue to be updated with relevant and popular papers periodically, based on emerging trends and the significance of newly published works in the field. Additionally, feel free to suggest any papers that you would like to see included in this list. This curated list highlights some of the most impactful and insightful …

Continue reading

Posted in agentic ai, Large Language Models. Tagged with , .

Understanding FAR, FRR, and EER in Auth Systems

false acceptance rate - false rejection rate - equal error rate

Have you ever wondered how systems determine whether to grant or deny access, and how they balance the risk of false acceptance with usability? This tutorial explores the fundamental concepts behind evaluating authentication systems or classification models using False Acceptance Rate (FAR), False Rejection Rate (FRR), and Equal Error Rate (EER). These metrics are essential for assessing the balance between usability and security in auth systems. Gaining a good understanding of these terms can greatly enhance both theoretical insights and practical application in designing reliable machine learning systems. What is False Acceptance Rate (FAR)? The False Acceptance Rate measures how frequently a system incorrectly grants access to an unauthorized individual. …

Continue reading

Posted in Data Science, Machine Learning. Tagged with , .

Top 10 Gartner Technology Trends for 2025

gartner technology trends 2025

What revolutionary technologies and industries will define the future of business in 2025? As we approach this pivotal year, the technological landscape continues to evolve rapidly, reshaping industries and redefining business strategies. Gartner has unveiled its top 10 strategic technology trends for 2025, emphasizing advancements in AI, computing, and human-machine interaction. Here’s a closer look at these transformative trends: Agentic AI Agentic AI systems are designed to autonomously plan and execute tasks based on user-defined goals. These virtual assistants are poised to enhance productivity by automating decision-making processes. By 2028, Gartner predicts that at least 15% of daily work decisions will be autonomously handled by agentic AI, a significant leap …

Continue reading

Posted in AI, Latest Tech, News.

OpenAI GPT Models in 2024: What’s in it for Data Scientists

openai models in 2024 - whats in it for data scientists

For data scientists and machine learning researchers, 2024 has been a landmark year in AI innovation. OpenAI’s latest advancements promise enhanced reasoning capabilities and multimodal processing, setting new industry benchmarks. Let’s dive into these milestones and their practical implications for data scientists. May 2024: Launch of GPT-4o OpenAI introduced GPT-4o (“o” for “omni”), a multimodal powerhouse designed for text, image, and audio processing. With faster response times and improved performance across multilingual and vision tasks, GPT-4o offers a great tool for developing advanced AI applications. Early adopters have reported up to 40% efficiency gains in tasks requiring multimodal analysis (Smith et al., 2024). GPT-4o’s ability to process and integrate multi-modal …

Continue reading

Posted in ChatGPT, Large Language Models, OpenAI. Tagged with , , .

Collaborative Writing Use Cases with ChatGPT Canvas

collaborative writing use cases with chatgpt canvas

ChatGPT Canvas is a cutting-edge, user-friendly platform that simplifies content creation and elevates collaboration. Whether drafting detailed research papers, crafting visually engaging presentations, or writing professional emails, ChatGPT Canvas has the tools to make your work efficient and impactful. This guide explores leveraging Canvas effectively, tailored for college-level users and professionals alike. Developing Blogs, Articles or Research Essays Research essays, blogs & articless demand clarity, depth, and methodical organization. ChatGPT Canvas streamlines the entire process by offering tools to explore topics, verify facts, and refine your arguments. Its readability and visual integration features ensure that your essays are both compelling and accessible. Topic Exploration: Use web searches to dive into …

Continue reading

Posted in ChatGPT, Large Language Models, OpenAI. Tagged with , .

When to Use ChatGPT O1 Model

when to use chatgpt o1 model

Knowing when to use the LLM such as the ChatGPT O1 model is key to unlocking its full potential. For example, the O1 model is particularly beneficial in scenarios such as analyzing large datasets for patterns in genomics, designing experiments to test novel chemical reactions, or creating algorithms to optimize workflows in computational biology. These applications highlight its ability to address diverse and intricate challenges. Designed to address complex, multifaceted challenges, the O1 model shines when diverse expertise—spanning data analysis, experimental design, coding, and beyond—is required. Let’s delve into these capabilities to understand when and how they can be effectively applied to drive groundbreaking advancements across various fields. Data Analysis …

Continue reading

Posted in ChatGPT, Large Language Models. Tagged with , , .

Agentic Reasoning Design Patterns in AI: Examples

agentic reasoning design patterns - ai agents

In recent years, artificial intelligence (AI) has evolved to include more sophisticated and capable agents, such as virtual assistants, autonomous robots, and conversational large language models (LLMs) agents. These agents can think, act, and collaborate to achieve complex goals. Agentic Reasoning Design Patterns help explain how these agents work by outlining the essential strategies that AI agents use for reasoning, decision-making, and interacting with their environment. What is an AI Agent? An AI agent, particularly in the context of LLM agents, is an autonomous software entity capable of perceiving its environment, making decisions, and taking actions to achieve specific goals. LLMs enable these agents to understand natural language and reason …

Continue reading

Posted in AI, Large Language Models, Machine Learning. Tagged with , .