9

Building an LLM-Based Chat Service

Integrating a large language model (LLM) like OpenAI’s GPT-4o into a .NET project can significantly enhance its capabilities, offering advanced natural language processing (NLP), content generation, and more.

This chapter is about building an LLM-based chat service that will fine-tune a standard model with custom information, including a biography of this book’s author and information from the Northwind database. This allows the user to ask questions about the author and a fictional corporation’s database.

At the time of writing, cloud-based LLM APIs cost money. In this chapter, we will use one of the least expensive options: OpenAI’s GPT-3.5 Turbo. As OpenAI says, “GPT-3.5 Turbo is our fast and inexpensive ...

Get Tools and Skills for .NET 8 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.