# AI Study

1.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Generative AI fundamentals</mark>  
    Learn AI vs ML vs deep learning vs Generative AI.  
    Understand LLMs, training, inference, transformers, attention, context windows and hallucinations.  
    Understand where generative AI fits in full-stack applications.  
    Draw an LLM application architecture.
    
2.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">LLM concepts and tokenization</mark>  
    Tokens, token limits, context windows and temperature.  
    Input/output tokens, latency, cost and model selection.  
    System, developer and user instructions; conversation history.  
    Compare responses at different temperatures and prompt lengths.
    
3.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">First LLM API using Node.js</mark>  
    Set up a TypeScript project, environment variables and API key.  
    Make a request using the official JavaScript SDK.  
    Handle API errors, timeouts and token usage. Deliverable: A command-line AI assistant.  
    [https://developers.openai.com/api/docs/quickstart](https://developers.openai.com/api/docs/quickstart)
    
4.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Prompt engineering — Part 1</mark>  
    Zero-shot and few-shot prompting.  
    Role, context, task, constraints and output format.  
    Clear instructions and examples.  
    Create prompts for summarization, translation and code review.
    
5.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Prompt engineering — Part 2</mark>  
    Structured outputs, JSON schemas and Zod validation.  
    Prompt templates, output consistency and refusal handling.  
    Test prompts against a fixed set of questions. Deliverable: A resume analyzer that returns validated JSON.  
    [https://developers.openai.com/api/docs/guides/structured-outputs?api-mode=responses](https://developers.openai.com/api/docs/guides/structured-outputs?api-mode=responses)
    
6.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Embeddings and semantic similarity</mark>  
    Understand embeddings as numerical representations of text.  
    Learn cosine similarity, dimensions and semantic search.  
    Compare keyword search with meaning-based search.  
    Practice: Find similar FAQs using embeddings.
    
7.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Function calling and weekly revision</mark>  
    Understand tools, function schemas and tool results.  
    Let an LLM call a safe calculator or product lookup function.  
    Revise all concepts and commit your code to GitHub. Milestone: An LLM can return structured answers and invoke tools.
    
8.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">RAG architecture</mark>  
    Learn why RAG is needed, how it differs from fine-tuning, and the ingestion vs query-time workflow.  
    Practice: Design the architecture for a company-document chatbot.
    
9.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Document ingestion and chunking</mark>  
    Parse documents, split text into chunks, attach source metadata and preserve document IDs.  
    Deliverable: A script that ingests a folder of technical documents.
    
10.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Vector databases</mark>  
     Learn vectors, indexing, similarity metrics, metadata filtering and persistence.  
     Start with PostgreSQL + pgvector; explore a dedicated vector database later.  
     Practice: Store document chunks and their embeddings in the database.
     
11.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Semantic retrieval</mark>  
     Implement similarity search, top-k retrieval, metadata filters and relevant-document scoring.  
     Deliverable: A search API that returns the best matching chunks.
     
12.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Build RAG with LangChain.js</mark>  
     Learn document loaders, text splitters, embeddings, vector stores, retrievers and prompt templates.  
     Deliverable: Ask questions about your own technical documentation.  
     [https://reference.langchain.com/javascript/langchain](https://reference.langchain.com/javascript/langchain)
     
13.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Improve RAG quality</mark>  
     Learn chunk size and overlap, hybrid search, reranking, retrieval thresholds, citation generation and "I don't know" responses.  
     Practice: Test questions that cannot be answered from your documents.
     
14.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Build the first complete RAG API</mark>  
     Create Express endpoints for document ingestion, question answering and source retrieval.  
     Milestone: A working document Q&A backend with citations.
     
15.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">AI agent fundamentals</mark>  
     Agent loop: observe, decide, act and evaluate.  
     Tools, tool selection, observations and stopping conditions.  
     Understand ReAct-style agents and when a fixed workflow is better than an autonomous agent.  
     Practice: Design an agent that can search internal product documentation.
     
16.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">LangChain.js fundamentals</mark>  
     Learn chat models, prompt templates, output parsers, runnables, retrievers and tool definitions.  
     Deliverable: A reusable model-and-retriever service.  
     [https://reference.langchain.com/javascript/langchain](https://reference.langchain.com/javascript/langchain)
     
17.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Tool calling and agent implementation</mark>  
     Build tools such as `searchKnowledgeBase`, `getProductDetails` and `calculateTotal`.  
     Validate tool arguments with Zod and return typed results.  
     Deliverable: An agent that chooses between a calculator and RAG search.
     
18.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Agent memory and conversation history</mark>  
     Learn short-term conversational state, persistent checkpoints, summarization and retrieval of previous context.  
     Practice: Maintain conversation context across multiple questions.
     
19.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">LangGraph fundamentals</mark>  
     Learn graph state, nodes, edges, conditional edges, loops, checkpointing and termination conditions.  
     Deliverable: A graph that classifies a question, retrieves information and drafts an answer.  
     [https://docs.langchain.com/oss/javascript/langgraph/thinking-in-langgraph](https://docs.langchain.com/oss/javascript/langgraph/thinking-in-langgraph)
     
20.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Advanced agent workflows</mark>  
     Conditional routing and retry logic.  
     Human approval before sensitive actions.  
     Persistence, recovery and agentic RAG.  
     Separate planning, retrieval and answer-generation steps. Practice: Require human approval before an agent executes a mock refund.
     
21.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Agent evaluation and safety</mark>  
     Test tool-selection accuracy, invalid tool arguments, loops, timeouts and incorrect answers. Learn traces, execution logs and regression tests.  
     Milestone: A stateful LangGraph agent with tools, error handling and approval.  
     [https://github.com/langchain-ai/langgraphjs](https://github.com/langchain-ai/langgraphjs)
     
22.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Set up the project</mark>  
     Create React/Vite and Node/Express TypeScript projects.  
     Configure environment variables, API routes, error handling and GitHub.
     
23.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Build the chat interface</mark>  
     Create the chat screen, message history, loading states, error states and responsive UI.
     
24.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Implement secure LLM APIs</mark>  
     Build backend-only model calls, request validation, timeouts, rate limits and streaming responses.
     
25.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Add document ingestion</mark>  
     Accept appropriate document formats, extract text, chunk documents, create embeddings and save chunks with metadata.
     
26.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Connect vector retrieval</mark>  
     Implement pgvector similarity search, top-k retrieval, metadata filtering and document-level access restrictions.
     
27.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Implement RAG answers</mark>  
     Pass retrieved chunks to the model, return source references and handle insufficient evidence gracefully.
     
28.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Add a LangGraph agent</mark>  
     Create workflow nodes for intent classification, knowledge retrieval, tool execution and response generation.
     
29.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Testing and production hardening</mark>  
     Test APIs and RAG quality. Add authentication, permission checks, prompt-injection defenses, logging and cost/latency tracking.
     
30.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Deploy and prepare interviews</mark>  
     Deploy frontend, backend and database. Write README and architecture diagram, record a demo and prepare project-based interview answers.
     
31.  <mark class="bg-yellow-200 dark:bg-yellow-500/30">Study Material</mark>  
     LLM APIs and Generative AI  
     [https://developers.openai.com/api/docs/quickstart](https://developers.openai.com/api/docs/quickstart)  
     [https://developers.openai.com/api/docs/guides/structured-outputs?api-mode=responses](https://developers.openai.com/api/docs/guides/structured-outputs?api-mode=responses)  
     Learn model integration, structured results and tool calling.  
       
     LangChain.js  
     [https://docs.langchain.com/oss/javascript/langchain/overview](https://docs.langchain.com/oss/javascript/langchain/overview)  
     [https://reference.langchain.com/javascript/langchain](https://reference.langchain.com/javascript/langchain)  
     Focus on model integrations, retrievers, tools, prompts and RAG.  
       
     LangGraph.js  
     [https://docs.langchain.com/oss/javascript/langgraph/overview](https://docs.langchain.com/oss/javascript/langgraph/overview)  
     [https://github.com/langchain-ai/langgraphjs](https://github.com/langchain-ai/langgraphjs)  
     Focus on state, nodes, conditional routing, checkpointing and approval workflows  
       
     Vector databases and RAG  
     [https://supabase.com/docs/guides/ai](https://supabase.com/docs/guides/ai)  
     [https://supabase.com/docs/guides/database/extensions/pgvector](https://supabase.com/docs/guides/database/extensions/pgvector)  
     Learn embeddings, vector similarity, storage and retrieval.
