From the course: LLaMa for Developers
Unlock the full course today
Join today to access over 23,100 courses taught by industry experts.
Using schemas with LLaMA - Llama Tutorial
From the course: LLaMa for Developers
Using schemas with LLaMA
- [Instructor] In this video, we're going to learn how to be more structured with LLaMa. Our goal is to be able to use schemas in order to structure our data. For this video under 05_04, our goal will be to get a Python object back from LLaMa. The steps are pretty straightforward. We're going to define a pydantic schema. We're then going to define a langchain series of prompts. And finally, we're going to get a Python object in return. So let's go ahead and install our dependencies. We need langchain-groq and LangChain. Going to hit Enter on that. If you're not familiar with LangChain, it's a prompting framework, which has lots of useful packages. So we're going to import our prompt templates and ChatGroq. We'll be using the API key we used in previous videos. You can find the key on the left-hand side, clicking on this key icon. So let's import all these dependencies and we'll get to defining our pydantic schema. So we're using the PydanticOutputParser. First, we'll define a class…
Contents
-
-
-
-
-
-
-
(Locked)
Difference between LLaMA with commercial LLMs4m 8s
-
(Locked)
Few shot learning with LLaMA5m 7s
-
(Locked)
Chain of thought with LLaMA3m 16s
-
(Locked)
Using schemas with LLaMA3m 1s
-
(Locked)
Optimizing LLaMA prompts with DSPy4m 39s
-
(Locked)
Challenge: Generating product tags25s
-
(Locked)
Solution: Generating product tags1m
-
(Locked)
-