This repository contains a Jupyter Notebooks that demonstrates the development and usage of LangChain, a framework for building applications powered by large language models (LLMs). The notebook includes detailed examples and code snippets to guide you through various aspects of using LangChain. This is a code implementation of short course LangChain for LLM Application Development from Deeplearning.ai
We use NVIDIA's mistralai/mixtral-8x7b-instruct-v0.1
using NVIDIA-API. Also, we experiment with local llama-3
model using Ollama.
LangChain is a powerful framework designed to facilitate the creation of applications that leverage large language models. This notebook provides an in-depth exploration of LangChain's capabilities, including how to integrate different tools and technologies to enhance your LLM-based applications.
To run the notebook and experiment with LangChain, you'll need to set up your environment with the required dependencies. Follow the instructions below to get started:
- Clone this repository:
git clone https://github.com/subashbasnyat/llm-development-using-langchain.git
- Change to the repository directory:
cd llm-development-using-langchain
- Open the Jupyter Lab to explore and run the examples provided. Launch Jupyter Lab with the following command:
jupyter-lab
The notebook contains various sections that cover different functionalities and use cases of LangChain. Follow the step-by-step instructions and execute the code cells to see LangChain in action.
- Create a free account with NVIDIA.
- Choose your model. Click on the link if you want to use the mistralai/mixtral-8x7b-instruct-v0.1 model.
- Under Input select the Python tab, and click Get API Key. Then click Generate Key.
- Copy and save the generated key as NVIDIA_API_KEY. From there, you should have access to the endpoints.
- Introduction
- Models Prompts and Parsers
- Memory
- Chains
- Question Answering
- Langchain Evaluation
- Langchain Agents
If you want everything in a single Jupyter Notebook