
Explore how LangChain JS enables JavaScript developers to add AI-powered features, engineer prompts, and memory to apps, and build autonomous agents using leading LLMs from OpenAI, Google, and Facebook.
Explore the LangChain JS architecture, including the long chain core, long chain community, and partner packages for OpenAI and other LLMs, plus tools, agents, memory, and vector stores.
Learn how runnables in LangChain JS take input, produce output, and chain into a runnable chain by piping outputs to inputs, with invoke, stream, and batch.
Explore the long chain documentation and api reference to navigate concepts, classes, and memory tools, and learn to search the prompts module for chat prompt templates.
Obtain and manage API keys for OpenAI and Google Gemini to set up LangChain JS model. Build a prompt template, configure an output parser, and run end-to-end hello world chain.
Set up a LangChainJS hello world project by creating a folder, initializing a Node.js project, and installing core, long chain, and Google JNI packages, then configure package.json and overrides.
Create your first prompt using a prompt template in long chain js, introducing a pet animal variable and the format function.
build your first chain in LangChain JS by setting up the Gemini model, using an output string parser, and invoking the chain to produce a string result from a prompt.
Learn how prompt templates in LangChain JS turn user input and parameters into structured prompts and prompt values, using string, chat, few-shot, and multimodal types.
Learn to create a basic prompt with LangChain JS using the prompt template class, from template, and format and invoke to produce and run prompt values, including optional variables.
Explore LangChain JS's chat prompt template, teaching how to structure system, user, and AI messages, use class or array syntaxes, and pass dynamic variables to tailor prompts.
Master few-shot prompting in LangChain JS by building a few-shot chat message prompt template, dynamically selecting and packaging example inputs and outputs into a final prompt.
Explore multimodal prompting in JavaScript by sending base64-encoded images as data URLs to a Gemini 1.5 flash model, demonstrating two-image prompts and image-based responses.
Learn to compose a large template from smaller ones using a pipeline prompt in LangChain JS, enabling modular, maintainable prompts that can adapt by dynamically adding slots and examples.
Learn how LangChainJS distinguishes older LMS text-in models from modern chat models in long chain, and how invoke, stream, and batch interfaces enable chaining across Gemini, GPT-3/4, Claude.
Set up a Google generative ai model in long chain, configure api keys via environment variables, instantiate the model, and invoke it with a prompt to receive an ai message.
Learn how to control model responses with response generation parameters such as temperature, top K, top P, and max output tokens, plus stop signals, to balance creativity and focus.
Stream model responses by emitting tokens as they generate, reducing latency and delivering early output for a more interactive experience. Use for await and write tokens to standard output.
Log and monitor model usage by extracting prompt tokens, response tokens, and total tokens from response metadata. Track usage to enforce fair use, manage costs, and stay within rate limits.
Explore how output parsers in LangChain JS transform raw LLM output into JSON, HTTP streams, or comma-separated data, enabling structured extraction and integration with databases or APIs.
Use the string output parser as a standalone component to extract a plain string from a model’s response in LangChain JS, by instantiating the parser and calling parse on response.content.
Learn to parse json outputs from a language model, enforce a target json format with prompts, and convert string responses into actual json objects.
Explore retrieval augmented generation with LangChain JS, using private data to influence LLM responses by loading, chunking, embedding documents, and retrieving relevant chunks to ground answers.
Set up a new Node.js project for a rag project, configure the OpenAI API key, initialize npm, install langchain packages, and prepare to load data.
Learn to load data from a web page using cheerio and LangChain community loaders, building a data pipeline to prepare documents for querying GraphQL questions with an OpenAI model.
Split web page text into 1200-char chunks with 200-char overlap using a recursive character text splitter, generate OpenAI embeddings, and store them in Long Chain's in-memory vector store for search.
Retrieve context for prompts by pulling a retriever from the store, querying it to fetch relevant documents, and adding those results to your prompt before asking the model.
Build and test a rag-based generation pipeline in LangChain JS by composing prompt templates, context embedding, and retrieval chains to answer questions from your own data, like GraphQL vs rest.
Extract data from a pdf using LangChain JS for rag. Load with a pdf loader and pdf path to summarize malware activity trends from a mid-2022 report.
The sole purpose of this course is to get your feet wet and your hands building with LangChainJS
LangChainJS gives Web and JavaScript Developers to ability to add A.I-powered features to their web applications using best-in-class Large Language Models from OpenAI, Google, Anthropic and many more LLM vendors out there.
This is the perfect course to get yourself into A.I Engineering and A.I development with LangChain, the biggest A.I software development toolchain in the market today.
By the end of this course, you will have the skills to:
Design powerful prompts to query A.I models
Integrate with powerful models like Gemini 1.5 Flash from Google Generative AI and GPT 4o by OpenAI
Build conversational chat interactions with A.I models
Use A.I to process images
Control the creativity of the model and how much tokens it consumes
Track token consumption
Load data from local files or specific web pages
Generate results based on information from the web
Generate results based on information from your PDF files
So, if anything in the above list sounds fun, let's get started.
Also, feel free to inbox me about any new chapter you will like me to work on. I'll appreciate your suggestions