# Santa's AI Chat App - Building a Festive Chat Application with RAG and .NET Templates

> Build a festive Santa chat app with retrieval-augmented generation (RAG) using the Microsoft.Extensions.AI project templates, for the 2025 C# Advent Calendar.

- URL: https://blog.nimblepros.com/blogs/santas-ai-chat-app/
- Author: [Kyle McMaster](https://blog.nimblepros.com/authors/kyle/)
- Published: 2025-12-23
- Updated: 2026-11-06
- Categories: [AI](https://blog.nimblepros.com/categories/ai/)
- Publisher: [NimblePros](https://blog.nimblepros.com/)

---

This blog post is part of the [2025 C# Advent Calendar](https://csadvent.christmas/). Thanks to [Matt Groves](https://crosscuttingconcerns.com/) for organizing this awesome collection of knowledge and festivities. I'd also like to give a special shout out to the other NimblePros' team members who contributed to this event, [Sadukie](https://sadukie.com/2025/12/06/csadvent.html), [Ardalis](https://ardalis.com/single-file-tests-in-dotnet-csharp/), and [Barret](https://barretblake.dev/posts/development/2025/12/csadvent2025-extension-members/) 🎉

## Santa's Dilemma 🎅❓

It's that magical time of year again! Santa is gearing up for his annual journey to deliver gifts to children around the world. However, this year, Santa faces a unique challenge. Santa needs a more efficient and interactive way to manage the naughty or nice list, understand gift preferences, and ensure that every child receives the perfect present. Wouldn't it be nice if Santa could chat with the list to provide better real-time feedback to the elves on children's wishes?

![Santa spreading holiday cheer online](https://blog.nimblepros.com/blogs/santas-ai-chat-app/santa-chatting-with-ai.webp)

### Enter AI and RAG 🤖🎄

Luckily for Santa, advancements in Artificial Intelligence (AI) and [Retrieval-Augmented Generation (RAG)](https://learn.microsoft.com/en-us/azure/developer/ai/augment-llm-rag-fine-tuning) offer a promising solution. By leveraging these technologies, Santa can create a chat application that allows him to communicate with the naughty or nice list. Even better, since Santa has some C# experience with .NET, he can utilize the new [Microsoft.Extensions.AI project templates](https://learn.microsoft.com/en-us/dotnet/ai/quickstarts/ai-templates) to build this application quickly and efficiently.

## Building the Santa Chat Application 🛠️💻

Since Santa is already familiar with .NET 10, he can easily get started by installing the dotnet project templates. Here's how Santa can do it:

```bash
dotnet new install Microsoft.Extensions.AI.Templates::10.0.1-preview.3.25571.5
```

Next, Santa can create a new project using the AI chat template:

```bash
dotnet new aichatweb -o SantaChatApp --provider openai
```

Then Santa configures his OpenAI API key using `dotnet user-secrets`. For reference Santa got his API key from [OpenAI's platform](https://platform.openai.com/api-keys).

```bash
dotnet user-secrets set "OpenAI:Key" "sk-proj-YOUR-API-KEY-HERE"
```

Finally, Santa can run his new chat application:

```bash
dotnet run --project SantaChatApp.csproj
```

This will give Santa a friendly chat interface for interacting with LLMs and local documents that have been ingested by the RAG system that are included in the template project. In this template project, local documents are ingested into a vector storage database and then retrieved to add additional context to the user's prompts.

![Santa's AI Chat Application Interface](https://blog.nimblepros.com/blogs/santas-ai-chat-app/santa-chat-app-interface.png)

With the project set up, Santa can now customize the RAG capabilities in his chat application. He can use pre-trained language models to understand and respond to children's wishes effectively. Santa imports his naughty or nice list into the `wwwroot/data` directory as a simple markdown file. The RAG system will index this data to enable quick retrieval during chats. He can also import other relevant documents, such as letters to Santa, to enhance the chat experience. Here's a simple example of some data Santa might use in markdown format:

```markdown
# Naughty or Nice List

|    Name    | Status  |
|------------|---------|
| Ardalis    | Nice    |
| Barrett    | Nice    |
| Coop       | Naughty |
| Eric       | Naughty |
| Jeff V     | Nice    |
| Jeff Z     | Nice    |
| Kevin      | Nice    |
| Kyle       | Naughty |
| Michelle   | Nice    |
| Sadukie    | Naughty |
| Scott      | Nice    |
| Thomas     | Nice    | 
```

With a little vibe coding to make this application silent night themed, Santa now has his chat application ready to spread some holiday cheer!

![Santa's Festive AI Chat Application Interface](https://blog.nimblepros.com/blogs/santas-ai-chat-app/santa-chat-app-demo.gif)

Notice how the application responds to queries about the naughty or nice list based on the data in the table above. Santa can see some of the NimblePros team has been up to no good heckling each other this year. 😆 With all of this ingested data in place, Santa can now interactively query his list and ensure that every child receives the perfect gift (looks like Sadukie is getting coal! 💥).

## Conclusion 🎁🧠

The new Microsoft.Extensions.AI.Templates make getting started with chat based AI interactions and RAG a breeze, even for busy folks like Santa. The full source for this application is available on [my GitHub repo for this project](https://github.com/KyleMcMaster/SantaChatApp) If you're interested in building your own AI-powered chat applications, be sure to check out the Microsoft.Extensions.AI.Templates and explore the exciting possibilities of generative AI and RAG! Thanks for reading, and happy holidays! 🎄🤖🎅

## Resources 📚

- [2025 C# Advent Calendar](https://csadvent.christmas/)
- [Source Code for Santa Chat Application](https://github.com/KyleMcMaster/SantaChatApp)
- [Retrieval-Augmented Generation (RAG) - Microsoft Learn](https://learn.microsoft.com/en-us/azure/developer/ai/augment-llm-rag-fine-tuning)
- [Microsoft.Extensions.AI project templates](https://learn.microsoft.com/en-us/dotnet/ai/quickstarts/ai-templates)
- [OpenAI's platform](https://platform.openai.com/api-keys)
