Prompts#get.
You can pass an example selector to the method to select the few-shot examples to be
included in the prompt.
Check out Using an example
selector
section to learn more about example selectors.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Select few-shot examples to be included in the prompt
Prompts#get.
You can pass an example selector to the method to select the few-shot examples to be
included in the prompt.
from langchain.prompts.example_selector import SemanticSimilarityExampleSelector
from langchain.vectorstores import Chroma
from langchain.embeddings import OpenAIEmbeddings
example_selector = SemanticSimilarityExampleSelector.from_examples(
[], # Keep it empty. The examples will be set by LangBear.
OpenAIEmbeddings(),
Chroma,
k=1
)
prompt = lb.prompts.get(
"company-name-generation",
example_selector=example_selector
)
TBD;