Skip to content

Code samples and resources to learn Generative AI with JavaScript

License

Notifications You must be signed in to change notification settings

microsoft/generative-ai-with-javascript

Repository files navigation

Generative AI for Beginners with JavaScript

License Watch the video series PRs Welcome

Azure AI Discord

⭐ If you like this repo, star it on GitHub — it helps a lot!

Getting StartedLessonsKeep Learning

Ready to integrate Generative AI into your JavaScript apps?

This course throws you into a time-traveling adventure—meet history’s legends with a fun twist, while learning Generative AI technologies ✨

Important

Open-source vibes! Reuse, tweak, and share this content freely.

Character App Sneak Peek

Step Into History with AI Magic!

Dive into an immersive learning experience powered by Generative AI:

  • Learn about Generative AI technologies. If you've wanted to understand Generative AI and the potential for your applications, you're in the right place!

  • Epic Time-Travel Stories. Dive into a fun tale, chatting with icons like Leonardo da Vinci, Ada Lovelace, or Montezuma in every lesson.

  • Companion App. Chat with historical figures—yes, they speak back!
    Chat with History
    Check the app directory to run the app locally or use GitHub Codespaces to run it online.

  • Accessibility FTW. Read it, hear it—audio tags bring it to life.

“It’s like a comic book with code!” — Happy User

Getting Started

Throughout this course you'll find many code examples and exercises, so we encourage you to run and experiment with the code in your own copy of this repository:

  1. Select the Fork button in the upper right-hand corner of the repository or select this button: Fork

  2. Click the Code button in your forked repository, go to the Codespaces tab, and then choose Create codespace.

    This will create a preconfigured online environment for you. You'll then be able to use GitHub Models to run the code examples and interact with AI models for free, without any additional setup.

Note

While GitHub Codespaces provides a quick and easy starting point you can also run the code samples locally.

Learn more about GitHub Codespaces and GitHub Models concepts here.

Lesson description

📦 Each lesson includes:

  • A written lesson with an assignment and quiz.
  • A short video to help further your learning.
  • Solutions for each assignment and quiz.
  • Characters you can interact with using our companion app, demonstrating Generative AI.

Lessons

🗃️ Table of content

# Lesson Link Description
1 Introduction to Generative AI and LLMs for JavaScript Developers Understand Generative AI and LLM fundamentals, their applications and limits in JavaScript, and how to use AI to enhance user experiences.
2 Build your first AI app Set up your development environment, write a basic app, and understand system prompts.
3 Prompt engineering Learn Prompt engineering fundamentals, techniques, and meta-prompts for better AI outcomes.
4 Structured output Learn structured output, how to extract data from prompts, and present it in various formats, such as JSON, for easier consumption.
5 Retrieval augmented generation (RAG) Learn the basics of RAG, how to integrate external data, and how to leverage it for more relevant, accurate AI responses.

New lessons will be added to the course over time, so stay tuned!

Keep Learning

🙌 After completing this course, you can continue learning by exploring our additional resources.

🎬Video Series
# Session Description Slides Demo Script Video
0 Series introduction Introduces the series and its content. pptx / pdf - Script 📺
1 What you need to know about LLMs Explores what are LLMs, how they're trained, how they work and their limits. pptx / pdf Demo Script 📺
2 Essential prompt engineering techniques Practical prompt engineering techniques to get the best out of AI models. pptx / pdf Demo Script 📺
3 Improve AI accuracy and reliability with RAG Introduces Retrieval-Augmented Generation, to use AI with your own data. pptx / pdf Demo Script 📺
4 Speed up your AI development with LangChain.js Covers LangChain.js framework core concepts, and how to use it to accelerate AI developments. pptx / pdf Demo Script 📺
5 Run AI models on your local machine with Ollama Shows how to integrate local AI models into your development workflow. pptx / pdf Demo Script 📺
6 Get started with AI for free using Phi-3 Experiments with Ollama and Phi-3 model directly from your browser. pptx / pdf Demo Script 📺
7 Introduction to Azure AI Foundry Kickstart your journey with Azure AI Foundry. pptx / pdf Demo Script 📺
8 Building Generative AI Apps with Azure Cosmos DB Build generative AI apps with Azure Cosmos DB and vector search. pptx / pdf Demo Script 📺
9 Azure tools & services for hosting and storing AI apps Build, deploy, and scale AI applications using Azure tools. pptx / pdf - Script 📺
10 Streaming Generative AI output with the AI Chat Protocol Integrate streaming easily into your apps with the AI Chat Protocol. pptx / pdf Demo Script 📺

To see the full page of resources, go this video overview page.

🎒 Other Courses

You'll also find additional resources in the form of tutorials, code samples and more.

Responsible AI Disclaimer

Important

DISCLAIMER: This repository contains fictional content generated by AI. The historical characters depicted here are speaking back thanks to generative AI, which is based on training data. Any utterances made by these characters do not represent their actual views or quotes. This content is intended solely for entertainment purposes. Learn more about Microsoft Responsible AI principles here

Interact with community

Azure AI Discord