LLMs in Production cover
welcome to this free extract from
an online version of the Manning book.
to read more
or

8 Applications and Agents: Building an interactive experience

 

This chapter covers

  • Building an interactive application that uses an LLM service
  • Running LLMs on edge devices without a GPU
  • Building LLM agents that can solve multistep problems
No one cares how much you know until they know how much you care.
—President Theodore Roosevelt

Throughout this book, we’ve taught you the ins and outs of LLMs—how to train them, how to deploy them, and, in the last chapter, how to build a prompt to guide a model to behave how you want it to. In this chapter, we will put it all together. We will show you how to build an application that can use your deployed LLM service and create a delightful experience for an actual user. The key word there is delightful. Creating a simple application is easy, as we will show, but creating one that delights? Well, that’s a bit more difficult. We’ll discuss multiple features you’ll want to add to your application and why. Then, we’ll discuss different places your application may live, including building such applications for edge devices. Lastly, we’ll dive into the world of LLM agents, building applications that can fulfill a role, not just a request.

8.1 Building an application with RAG

8.1.1 Streaming on the frontend

8.1.2 Keeping a history

8.1.3 Chatbot interaction features

8.1.4 Token counting

8.1.5 RAG applied

8.2 Edge applications

8.3 LLM agents

Summary