Perhaps the best thing about artificial intelligence is that you no longer have to be a boss to get a personal assistant who responds to your every demand. Now, you can just build one.
AI assistants are intelligent software systems designed to perform tasks and provide services for people using artificial intelligence. They can understand natural language, process information, and respond to queries enabling them to handle a wide range of tasks, from answering questions on a variety of topics to controlling smart home devices to assisting with customer service. With the advent of large language models (LLMs) and AI agents, it's now possible to build highly capable AI assistants that can interact with multiple tools, providing even more sophisticated and personalized responses.
In August’s Code & Deploy LinkedIn Live session, Intel Open Source AI Evangelist Eze Lanza and Bilge Yücel, developer relations engineer at deepset, explain how to build your own custom AI agent using Haystack, an open source Python framework designed for building production-ready applications powered by LLMs. You can use Haystack to develop everything from retrieval-augmented generative (RAG) pipelines to state-of-the-art search systems for vast document collections to conversational systems like chatbots and intelligent agents.
The framework is built around two core building blocks: components and pipelines. Components are individual units that perform specific tasks, such as Embedders, Retrievers, Generators, Routers, Converters, and Preprocessors. These components can be linked together to form pipelines. Since pipelines are directed graphs, they can include loops and branches, providing an additional layer of flexibility.
Figure 1. Basic diagram of components interacting to create a pipeline in Haystack
In this hands-on coding session, Bilge walks you through the fundamentals of building a Web QA pipeline using Haystack components. She then demonstrates how to integrate Mistral-7B-Instruct-v0.3 with a RAG pipeline, the WebSearch pipeline, and the Weather API as tools, creating an AI assistant capable of answering questions based on your data, searching Google for information, and providing local weather forecasts.
Figure 2. Learn how to build a Web QA system following the step-by-step instructions in the recording of this live coding session.
You can access the live notebooks here:
Build a Custom AI Agent with Haystack.ipynb
Haystack-Basics-with-Web-QA.ipynb
Watch the Video
About the Author
Bilge Yücel, developer relations engineer, deepset
Bilge Yücel is a developer relations engineer at deepset working with Haystack, an open source large language model (LLM) framework. With over two years of experience as a software engineer, she developed a strong interest in natural language processing (NLP) and pursued a master's degree in artificial intelligence at KU Leuven with a focus on NLP. Now, she enjoys working with Haystack and helping the community build custom LLM applications.