$ show microsoft/generative-ai-for-beginners
This is a comprehensive educational course repository ('Generative AI for Beginners') containing 21 structured lessons covering the full spectrum of generative AI application development. While classified as an application repository due to its extensive runnable code examples across Python, JavaScript, TypeScript, and .NET, its primary purpose is pedagogical. The repository teaches practical patterns for building GenAI applications including: prompt engineering, chat applications, RAG/vector search, image generation, function calling, AI agents, fine-tuning, LLMOps, and responsible AI practices. Each lesson provides assignments and solutions for multiple LLM providers (Azure OpenAI, OpenAI, GitHub Models). The codebase demonstrates modern GenAI application patterns with a strong emphasis on multi-language implementation parity and accessibility through 40+ language translations. The shared/python utilities provide reusable helpers for API interactions, environment management, and input validation that could be extracted for production use.
The LLM identified 6 files worth highlighting for reuse:
Provider-agnostic API utility layer that abstracts differences between Azure OpenAI, OpenAI, and GitHub Models endpoints. Implements retry logic, error handling, and consistent response parsing. Reusable as a foundation for multi-provider GenAI applications.
Centralized environment variable loading with validation, supporting both local development (.env files) and cloud deployment (Azure Key Vault, GitHub Codespaces secrets). Demonstrates secure configuration patterns for GenAI applications requiring API keys and endpoint URLs.
Input validation and sanitization utilities specifically designed for LLM applications. Includes prompt injection detection, length limiting, and content filtering. Addresses a critical security concern in GenAI applications and can be directly integrated into production chat/completion endpoints.
Production-grade embedding generation pipeline that processes transcripts in batches, handles rate limiting, implements checkpointing for resumability, and outputs vector indexes. Demonstrates scalable RAG data preparation patterns applicable to any document corpus.
Comprehensive RAG implementation notebook demonstrating multiple vector database integrations (Azure AI Search, FAISS, Chroma), hybrid search strategies, chunking optimization, and evaluation metrics. Serves as a reference architecture for production RAG systems.
TypeScript implementation of OpenAI function calling with strict schema validation, error handling, and streaming support. Demonstrates the agent-tool interaction pattern essential for building AI agents that can execute code, query APIs, or manipulate data.