2023-03-27 02:49:46 +00:00
|
|
|
Prompts
|
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
|
|
|
==========================
|
|
|
|
|
2023-03-27 02:49:46 +00:00
|
|
|
.. note::
|
|
|
|
`Conceptual Guide <https://docs.langchain.com/docs/components/prompts>`_
|
|
|
|
|
|
|
|
|
|
|
|
The new way of programming models is through prompts.
|
2023-06-03 21:44:32 +00:00
|
|
|
A **prompt** refers to the input to the model.
|
|
|
|
This input is often constructed from multiple components.
|
|
|
|
A **PromptTemplate** is responsible for the construction of this input.
|
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
|
|
|
LangChain provides several classes and functions to make constructing and working with prompts easy.
|
|
|
|
|
2023-06-03 21:44:32 +00:00
|
|
|
|
|
|
|
|
- `Getting Started <./prompts/getting_started.html>`_: An overview of the prompts.
|
2023-03-27 02:49:46 +00:00
|
|
|
|
|
|
|
|
2023-06-03 21:44:32 +00:00
|
|
|
- `LLM Prompt Templates <./prompts/prompt_templates.html>`_: How to use PromptTemplates to prompt Language Models.
|
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
|
|
|
|
|
|
|
|
2023-06-03 21:44:32 +00:00
|
|
|
- `Chat Prompt Templates <./prompts/chat_prompt_template.html>`_: How to use PromptTemplates to prompt Chat Models.
|
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
|
|
|
|
|
|
|
|
2023-06-03 21:44:32 +00:00
|
|
|
- `Example Selectors <./prompts/example_selectors.html>`_: Often times it is useful to include examples in prompts.
|
|
|
|
These examples can be dynamically selected. This section goes over example selection.
|
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
|
|
|
|
|
|
|
|
2023-06-03 21:44:32 +00:00
|
|
|
- `Output Parsers <./prompts/output_parsers.html>`_: Language models (and Chat Models) output text.
|
|
|
|
But many times you may want to get more structured information. This is where output parsers come in.
|
|
|
|
Output Parsers:
|
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
|
|
|
|
2023-06-03 21:44:32 +00:00
|
|
|
- instruct the model how output should be formatted,
|
|
|
|
- parse output into the desired formatting (including retrying if necessary).
|
2023-03-27 02:49:46 +00:00
|
|
|
|
2023-05-13 16:23:51 +00:00
|
|
|
|
Docs refactor (#480)
Big docs refactor! Motivation is to make it easier for people to find
resources they are looking for. To accomplish this, there are now three
main sections:
- Getting Started: steps for getting started, walking through most core
functionality
- Modules: these are different modules of functionality that langchain
provides. Each part here has a "getting started", "how to", "key
concepts" and "reference" section (except in a few select cases where it
didnt easily fit).
- Use Cases: this is to separate use cases (like summarization, question
answering, evaluation, etc) from the modules, and provide a different
entry point to the code base.
There is also a full reference section, as well as extra resources
(glossary, gallery, etc)
Co-authored-by: Shreya Rajpal <ShreyaR@users.noreply.github.com>
2023-01-02 16:24:09 +00:00
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
:maxdepth: 1
|
2023-06-03 21:44:32 +00:00
|
|
|
:caption: Prompts
|
|
|
|
:name: prompts
|
|
|
|
:hidden:
|
2023-03-27 02:49:46 +00:00
|
|
|
|
2023-06-03 21:44:32 +00:00
|
|
|
./prompts/getting_started.html
|
2023-03-27 02:49:46 +00:00
|
|
|
./prompts/prompt_templates.rst
|
2023-06-03 21:44:32 +00:00
|
|
|
./prompts/chat_prompt_template.html
|
2023-03-27 02:49:46 +00:00
|
|
|
./prompts/example_selectors.rst
|
|
|
|
./prompts/output_parsers.rst
|