mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-07 05:52:15 +00:00
Minor grammatical fixes (#1325)
Fixed typos and links in a few places across documents
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Create a custom example selector
|
||||
|
||||
In this tutorial, we'll create a custom example selector that selects examples every alternate example given a list of examples.
|
||||
In this tutorial, we'll create a custom example selector that selects every alternate example from a given list of examples.
|
||||
|
||||
An `ExampleSelector` must implement two methods:
|
||||
|
||||
@@ -65,4 +65,4 @@ example_selector.examples
|
||||
# Select examples
|
||||
example_selector.select_examples({"foo": "foo"})
|
||||
# -> array([{'foo': '1'}, {'foo': '4'}], dtype=object)
|
||||
```
|
||||
```
|
||||
|
@@ -8,7 +8,7 @@ In this tutorial, we will learn about:
|
||||
|
||||
## What is a prompt template?
|
||||
|
||||
A prompt template refers to a reproducible way to generate a prompt. It contains a text string ("the template"), that can can take in a set of parameters from the end user and generate a prompt.
|
||||
A prompt template refers to a reproducible way to generate a prompt. It contains a text string ("the template"), that can take in a set of parameters from the end user and generate a prompt.
|
||||
|
||||
The prompt template may contain:
|
||||
- instructions to the language model,
|
||||
|
@@ -62,7 +62,7 @@ To learn more about how to provide few shot examples, see [Few Shot Examples](ex
|
||||
|
||||
If there are multiple examples that are relevant to a prompt, it is important to select the most relevant examples. Generally, the quality of the response from the LLM can be significantly improved by selecting the most relevant examples. This is because the language model will be able to better understand the context of the prompt, and also potentially learn failure modes to avoid.
|
||||
|
||||
To help the user with selecting the most relevant examples, we provide example selectors that select the most relevant based on different criteria, such as length, semantic similarity, etc. The example selector takes in a list of examples and returns a list of selected examples, formatted as a string. The user can also provide their own example selector. To learn more about example selectors, see [Example Selection](example_selection.md).
|
||||
To help the user with selecting the most relevant examples, we provide example selectors that select the most relevant based on different criteria, such as length, semantic similarity, etc. The example selector takes in a list of examples and returns a list of selected examples, formatted as a string. The user can also provide their own example selector. To learn more about example selectors, see [Example Selectors](examples/example_selectors.ipynb).
|
||||
|
||||
<!-- TODO(shreya): Add correct link here. -->
|
||||
|
||||
|
Reference in New Issue
Block a user