참조 : https://python.langchain.com/docs/modules/model_io/concepts
Concepts
Group | Item | Desc | Others |
Model | LLMs | LLMs in LangChain refer to pure text completion models. | |
Chat Models | Chat models are often backed by LLMs but tuned specifically for having conversations. | ||
Cosideration | These two API types have pretty different input and output schemas. In particular, the prompting strategies for LLMs vs ChatModels may be quite different. Different models have different prompting strategies - Anthropic's models work best with XML - while OpenAI's work best with JSON |
||
Messages | HumanMessage | Messge from user | |
AIMessage | Message from the model | ||
SystemMessage | Only some model support | ||
FunctionMessage | The inputs to language models | ||
Prompt | PromptValue | ||
PromptTemplate | |||
MessagePromptTemplate | HumanMessagePromptTemplate AIMessagePromptTemplate SystemMessagePromtTemplate |
||
MessagPlaceholder | Oftentimes inputs to prompts can be a list of messages. This is when you would use a MessagesPlaceholder. |
||
ChatPromptTemplate | |||
Output Parser |
StrOutputParser | LLM = String ChatModel = message (.contents) |
|
OpenAI Functions Parsers | |||
Agent Output Parsers |
'ML&DL and LLM' 카테고리의 다른 글
LangChain - 1.2.4 Few-shot prompt template (0) | 2024.03.28 |
---|---|
LangChain - 1.2.1 PromptTemplate (0) | 2024.03.27 |
LangChain (0) | 2024.03.27 |
[Langchain] Prompt 튜닝 (1) | 2024.03.05 |
[ML&DL] AI - 2 - AI 역사 (1) | 2019.04.20 |