Skip to content

Dometrain/ai-chatbot-using-your-data-in-dotnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Let's Build It: AI Chatbot Using Your Data in .NET

Welcome to the "Let's Build It: AI Chatbot Using Your Data in .NET" course on Dometrain!

Getting Started

The course will take you through the AI chatbot project in five steps:

Step Description Front end url
1 An indexer that creates embeddings from the introduction of each Wikipedia article and allows you to search for Wikipedia articles http://localhost:3000/searchlandmarks
2 An indexer that include text splitting and chunking, allowing you to search for more fine grained content inside the entire Wikipedia article body http://localhost:3000/searchchunks
3 A question answering service that uses RAG to write answers grounded in the Wikipedia data http://localhost:3000/question
4 Introduction of HYDE queries for better recall by creating the VectorSearchServiceWithHyde.cs class http://localhost:3000/question
5 A chat API that uses tool calling to search your vector database http://localhost:3000/chat

The code in this repository is the final version (step 5), but classes used in the previous steps are also included for reference.

Prerequisites

The backend uses .NET version 10 so install the .NET SDK in order to run locally.

Getting Your API Keys

The project on this course integrates with two third party services by using API keys. You will need to create accounts on these services and create API keys.

OpenAI

You can create an API key for OpenAI on platform.openai.com/api-keys after creating an account with OpenAI. This API key will be placed into an environment variable called OPENAI_API_KEY in your appsettings.json:

Pinecone

Pinecone is a cloud-based vector database service designed for fast and scalable similarity search. Sign up for the Starter plan (free at time of writing) and create an API key using this guide https://docs.pinecone.io/guides/projects/manage-api-keys.

This API key will be placed into an environment variable called PINECONE_API_KEY in your appsettings.json

Environment Variables

Your final appsettings.json should look like this:

{
  ...
  "Keys": {
    "OPENAI_API_KEY": "<< your api key >>>",
    "PINECONE_API_KEY": "<< your api key >>>"
  }
}

Running The Project

Please see the individual README files for the backend and the frontend

About

The accompanying source code for the DomeTrain Course "Let's Build It: AI Chatbot Using Your Data in .NET"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published