Home / Companies / Baseten / Blog / Post Details
Content Deep Dive

Build a chatbot with Llama 2 and LangChain

Blog post from Baseten

Post Details
Company
Date Published
Author
Philip Kiely
Word Count
1,440
Company Posts That Month
6
Language
English
Hacker News Points
-
Post removed?
No
Summary

Llama 2 is a state-of-the-art open-source large language model that can be used for chatbots, and it comes pre-tuned for chat applications in three different sizes: 7B, 13B, and 70B. LangChain is a toolkit that allows developers to build with LLMs like Llama 2, using closed-source models or open-source models like Llama 2. The tutorial adapts the Create a ChatGPT Clone notebook from the LangChain docs, but instead of asking the model to behave as a Linux terminal, it asks Llama 2 to behave as an NPC for a video game. Llama 2 has a context window of 4,096 tokens, which is twice as much as Falcon and equal to the base version of GPT-3.5. LangChain lets developers take advantage of Llama 2's large context window to build a chatbot with just a few lines of code. The tutorial goes through building a chatbot that takes advantage of Llama 2's large context window, using Baseten to host Llama 2 for inference and the latest versions of the necessary Python packages.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
LLM 16 1,819 224 89 -2%
Secrets Management 1 1,337 217 54 +8%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.