AskReference
Cover of AI Agents and Applications

AI Agents and Applications

Andrea De Mauro

MEAP Edition Version 7

PublisherManning PublicationsPublished2025pages273LanguageEnglishFormatPDF
View ebook
Generative AI FundamentalsLLM Architecture and Inner WorkingsBuilding GenAI ApplicationsPrompt EngineeringRetrieval-Augmented Generation (RAG)Document Indexing and EmbeddingsTools and Function CallingAgents and Agentic AIAgentic Structures and Workflows

About this book

Welcome to the MEAP (Manning Early Access Program) for AI Applications Made Easy! I’m genuinely excited to have you on board as one of the first readers, your journey into creating with Generative AI starts now.

Many of us already use GenAI daily, from chatbots like ChatGPT to AI-driven content tools. But using a GenAI app is one thing, building one is another. This book is designed to help you become a maker of GenAI applications. Right from the first few chapters, you’ll start building real, functional GenAI applications, not just experimenting with existing tools. I wrote this book to unleash your creativity and help you build something unique and tailored to your own needs. I can’t wait to see what you create!

GenAI tools and LLM models will come and go, but creating GenAI applications requires mastering fundamental techniques that will remain relevant for years. Concepts like prompt engineering, Retrieval-Augmented Generation (RAG), agentic structures, and tool design are essential skills that will give you a competitive advantage in the long run, no matter how technology evolves.

Unlike many AI books that take deep programming knowledge for granted, AI Applications Made Easy leverages low-code, open-source platforms like Langflow and KNIME, making AI development quick and accessible to everyone. These low-code tools are not just simplified solutions for beginners, they are comprehensive platforms that offer full customization and scalability. Even seasoned data scientists and GenAI developers who are comfortable writing code are turning to these tools because they make prototyping faster, more efficient, and highly scalable.

The book includes full, step-by-step tutorials starting from Chapter 2. Each tutorial guides you in building a GenAI app from scratch, such as a virtual customer service assistant, a marketing advisor, or a financial analyst. My goal is for you to learn by doing, experiencing firsthand what it means to develop end-to-end AI solutions that go beyond experimentation into real-world deployment.

As a MEAP reader, you get early access to the content while I continue writing. Your feedback is invaluable to me, it will directly shape the final book. I encourage you to share your thoughts on clarity, examples, and illustrations, and most importantly, to fully run all the exercises on your laptop so you can experience firsthand what this book enables. You can share your feedback on the LiveBook Discussion forum, I will read all of it, and I truly appreciate your contributions.

Thank you for joining me on this exciting journey. Happy building!

Your loving author,, Andrea De Mauro

Questions & Answers from this book

22 questions8 chapters covered14 topics

Questions and answers are connected to the referenced book and its available source material.

Chapter 1: Peeking inside the black box

In the PizzaMate™ RAG system, what are the two subflows and what is the purpose of each?

The two subflows are document ingestion and retrieve and answer. Document ingestion takes the PDF as input and produces a vector database with embedded chunks; it runs only when the database is created or the PDF information changes. Retrieve and answer takes a user query, performs a vector similarity search to find the most relevant chunks, and uses an LLM to answer the query; it runs whenever a user asks a question.

Intermediatep. 89-101
Read answer

Why does RAG use embeddings instead of storing raw text for keyword search?

RAG uses embeddings because keyword search over raw text can only match exact or similar words, not meaning. Embeddings convert text into numbers that capture semantic content, so retrieval becomes a search for meaning instead of literal word matches. This makes RAG far more powerful and flexible at finding relevant context for a question.

Intermediatep. 89-99
Read answer

In the RAG example from the chapter, how is the Euclidean distance between the user's question and each chunk embedding used to select the top chunks for answer generation?

The question is embedded into the same vector space as the chunks. The Euclidean distance from that question embedding to each chunk embedding is calculated, and the chunks are sorted by increasing distance. The closest chunks, or top k, are selected and inserted into the prompt as context so the LLM can generate the answer.

Intermediatep. 89-99
Read answer

Chapter 3: Writing the right prompt

In the PizzaMate example, why did the LLM correctly identify the Morellino as the Tuscan wine even though the retrieved chunks did not explicitly state it?

The LLM identified the Morellino as the Tuscan wine because of its pre-trained general knowledge about Italian wines. The retrieved chunks mentioned several wines but did not explicitly state that Morellino was from Tuscany; the model used its existing knowledge to bridge that gap.

Intermediatep. 111-115
Read answer

What is the effect of chunk size on RAG performance, and why does it matter?

Chunk size is a key tuning factor in RAG because it directly affects whether retrieved chunks contain enough relevant information. Too-small chunks can miss necessary details, while too-large chunks create oversized context that degrades LLM performance and produce embeddings that no longer represent the chunk's content effectively. For this reason, chunk size must be balanced, often by experimenting with the Split Text component's chunk size and overlap parameters.

Intermediatep. 111-115
Read answer

What does the URL component do and what additional feature does it support for crawling webpages?

The URL component lets you enter one or more webpage addresses, and Langflow fetches their content and outputs it as a data table with text and metadata such as page title and language. It additionally supports recursive link traversal, meaning you can configure how many links away from the starting URL the crawler should follow, making it useful for indexing entire website sections.

Intermediatep. 111-115
Read answer

Chapter 5: Expanding GenAI capabilities with tools and agents

How do you connect the three tools to the agent in Langflow, and what is the purpose of the Toolset port?

In Langflow, you connect tools to the agent by first turning each component into a tool using its Tool Mode selector, then dragging the component near the agent and linking its tool output to the agent's dark cyan Toolset input port. The Toolset port is how the agent receives the descriptions and capabilities of all available tools, forming the toolset it can call during its reasoning loop.

Intermediatep. 123-148
Read answer

In the example from the chapter, what is the sequence of tool calls the agent makes to make the room comfortable for sleeping, and what information does it gather before making those calls?

The agent first gathers information by calling check_temperature() and check_light(). After learning the room is 24°C and the light is ON, it makes two further tool calls: set_thermostat(temp=20) and dim_lights(). Once both succeed, it tells the user that the thermostat is set to 20°C and the lights are dimmed for sleeping.

Intermediatep. 120-137
Read answer

What three tools are needed for the HistoryTravelBuddy™ agent, and what is the purpose of each?

The three tools are a web search tool, a URL fetching tool, and a Wikipedia search tool. The web search tool finds webpages about sights in the city; the URL tool retrieves the full content of a chosen webpage; the Wikipedia tool searches for historical articles and returns their titles, summaries, URLs, and full text.

Intermediatep. 134-148
Read answer

Chapter 6: Implementing agentic structures

In the HealthyChef reimagined example, what tools are given to the ChefAgent and DietitianAgent, and why are these tools chosen?

ChefAgent is given a RAG tool that retrieves recipes from a vector database built from The Italian Cook Book, chosen so the recipes are grounded in that specific 1919 source. DietitianAgent is given a URL-reading tool for fetching the EatWell Guide, chosen so it can consult official nutritional guidelines when reviewing and revising the recipe.

Intermediatep. 152-166
Read answer

How does the Chef agent use the FAISS tool to respond to a user query like 'I want to use eggplants and tomatoes'?

For a query like "I want to use eggplants and tomatoes", the Chef agent recognizes that the user is offering ingredients and autonomously decides to invoke its toolified FAISS retriever. The FAISS tool searches the cookbook vector database for relevant recipe chunks mentioning those ingredients. After reading the retrieved chunks, the agent responds with the matching Italian Cook Book recipe, staying faithful to the source and not inventing content.

Intermediatep. 158-166
Read answer

What are the roles of the three specialized agents in the CopyGenie™ hierarchical agentic structure, and what inputs and tools does each require?

The Planner Agent creates a detailed content plan by consulting the social media calendar and scheduling posts across the requested period. The Copywriter Agent drafts social media posts based on that plan while following the winery's brand guidelines. The Delivery Agent sends the finalized posts by email when the user requests it. Each is activated by the Supervisor Agent, which supplies the needed inputs and tools.

Intermediatep. 167-188
Read answer

Chapter 7: Integrating GenAI in your data ecosystem

How can you configure the CSV Reader node in KNIME to load a CSV file and optionally modify the table structure during loading?

Configure the CSV Reader node by double-clicking it or clicking the cog icon to open its configuration window, then click Browse to choose the CSV file. The node previews the table, and you can adjust reading settings such as column delimiters. For optional table changes during loading, open the Transformation tab to rename columns, remove some, or reorder them.

Intermediatep. 200-212
Read answer

How do you configure the Joiner node in KNIME to perform a left outer join that retains all customers even if they have no transactions?

Configure the Joiner node by connecting the Customer Master Data to the upper input (left table) and the Transaction History to the lower input (right table). In the Matching Criteria section, select CustomerID as the key for both tables. Under Include in Output, tick only Matching rows and Left unmatched rows, and leave Right unmatched rows unchecked. This retains all customers, including those with no transactions.

Intermediatep. 210-216
Read answer

In KNIME, what are two different ways to load an Excel file into the workflow, as described in the chapter?

One way is to drag and drop the Excel file directly from your file explorer onto the KNIME canvas. KNIME then creates an Excel Reader node with the file location already filled in. Another way is to drag an Excel Reader node from the Node Repository onto the canvas and configure its File location manually.

Intermediatep. 197-212
Read answer

You may also be interested in