Awesome AI AgentsCourses and Tutorials

pguso/rag-from-scratch

⭐ 1627 JavaScript repository created 2025-10-27

RAG from Scratch is a teaching repository that explains retrieval-augmented generation by having the reader build it piece by piece in plain JavaScript, without frameworks or cloud APIs. It follows the same approach as the related AI Agents from Scratch project: small, fully readable code samples with every function explained. The material is organised as a numbered learning path, and each step lives in its own directory containing runnable example code, a code walkthrough document and a separate concepts document. The path opens with a minimal end-to-end RAG flow in under seventy lines that shows how retrieval and generation fit together, then covers data loading and document normalization, text splitting and chunking with attention to overlaps, boundaries and granularity trade-offs, and generating embeddings locally so that text becomes vectors. It continues with building an in-memory vector store and nearest neighbour search over it, basic retrieval with similarity scoring and top-k selection, query preprocessing that cleans and normalizes user input before embedding, hybrid search that blends vector similarity with keyword signals such as BM25, and multi-query retrieval where an LLM decomposes a complex question into sub-queries that run in parallel and are fused with reciprocal rank fusion or weighted fusion, including deduplication and reranking of the merged result lists. Further steps address post-retrieval reranking, embedding normalization, augmentation of the model prompt with retrieved context and final generation with a local model. A showcase script combines the earlier lessons into one working pipeline. The intended audience is developers who want to understand how the pieces of a retrieval pipeline behave before adopting a higher level library, or who need a reference implementation they can read end to end.

https://github.com/pguso/rag-from-scratch

ragtutorialembeddingsvector-searchjavascript

Also in Courses and Tutorials

dair-ai/Prompt-Engineering-Guide

A comprehensive guide and resource hub for prompt engineering, context engineering, retrieval-augmented generation, and AI agents, offering tutorials, papers, tools, and courses to optimize the use of large language models.

shareAI-lab/learn-claude-code

Learn Claude Code is an educational project that teaches how to build modern AI coding agents like Claude Code through a progressive tutorial covering core concepts, planning, subagents, and skills mechanisms.

patchy631/ai-engineering-hub

AI Engineering Hub is a comprehensive repository offering in-depth tutorials and practical resources on Large Language Models, Retrieval-Augmented Generation, and real-world AI agent applications for learners and practitioners.

huggingface/agents-course

The Hugging Face Agents Course is a comprehensive educational resource that teaches the fundamentals and advanced concepts of AI agents and large language models through structured units, practical frameworks, and community collaboration.

NirDiamant/GenAI_Agents

GenAI_Agents is a comprehensive repository offering tutorials, implementations, and community resources for building and advancing generative AI agents from basic to advanced levels.

walkinglabs/learn-harness-engineering

This course provides a comprehensive project-based tutorial on Harness Engineering for building reliable AI coding agents, covering environment setup, state management, verification, and control.

The-Pocket/PocketFlow-Tutorial-Codebase-Knowledge

An AI-powered tool that analyzes GitHub repositories and generates beginner-friendly tutorials with visualizations to simplify understanding complex codebases.

alirezadir/Machine-Learning-Interviews

A comprehensive guide to prepare for machine learning and AI technical interviews at major tech companies, covering coding, ML fundamentals, system design, and behavioral aspects.