LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangChain
  • Universal
  • Hub
  • Node
  • Load
  • Serializable
  • Encoder Backed
  • File System
  • In Memory
LangChain Core
  • Agents
  • Caches
  • Base
  • Dispatch
  • Web
  • Manager
  • Promises
  • Chat History
  • Context
  • Base
  • Langsmith
  • Documents
  • Embeddings
  • Errors
  • Example Selectors
  • Indexing
  • Base
  • Chat Models
  • Llms
  • Profile
  • Load
  • Serializable
  • Memory
  • Messages
  • Tool
  • Output Parsers
  • Openai Functions
  • Openai Tools
  • Outputs
  • Prompt Values
  • Prompts
  • Retrievers
  • Document Compressors
  • Runnables
  • Graph
  • Singletons
  • Stores
  • Structured Query
  • Tools
  • Base
  • Console
  • Log Stream
  • Run Collector
  • Tracer Langchain
  • Stream
  • Async Caller
  • Chunk Array
  • Context
  • Env
  • Event Source Parse
  • Format
  • Function Calling
  • Hash
  • Json Patch
  • Json Schema
  • Math
  • Ssrf
  • Stream
  • Testing
  • Tiktoken
  • Types
  • Vectorstores
Text Splitters
MCP Adapters
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangChain
UniversalHubNodeLoadSerializableEncoder BackedFile SystemIn Memory
LangChain Core
AgentsCachesBaseDispatchWebManagerPromisesChat HistoryContextBaseLangsmithDocumentsEmbeddingsErrorsExample SelectorsIndexingBaseChat ModelsLlmsProfileLoadSerializableMemoryMessagesToolOutput ParsersOpenai FunctionsOpenai ToolsOutputsPrompt ValuesPromptsRetrieversDocument CompressorsRunnablesGraphSingletonsStoresStructured QueryToolsBaseConsoleLog StreamRun CollectorTracer LangchainStreamAsync CallerChunk ArrayContextEnvEvent Source ParseFormatFunction CallingHashJson PatchJson SchemaMathSsrfStreamTestingTiktokenTypesVectorstores
Text Splitters
MCP Adapters
Language
Theme
JavaScript@langchain/corepromptsFewShotPromptTemplateInput
Interfaceā—Since v1.0

FewShotPromptTemplateInput

Input common to all prompt templates.

Copy
interface FewShotPromptTemplateInput

Bases

BasePromptTemplateInput<InputValues>

Properties

property
examplePrompt: PromptTemplate
property
examples: Example[]

Examples to format into the prompt. Exactly one of this or exampleSelector must be provided.

property
exampleSelector: BaseExampleSelector

An BaseExampleSelector Examples to format into the prompt. Exactly one of this or examples must be provided.

property
exampleSeparator: string

String separator used to join the prefix, the examples, and suffix.

property
inputVariables: string[]
property
outputParser: BaseOutputParser<unknown>
property
partialVariables: PartialValues<any>
property
prefix: string

A prompt template string to put before the examples.

property
suffix: string

A prompt template string to put after the examples.

property
templateFormat: TemplateFormat

The formatting method to use on the prompt.

property
validateTemplate: boolean

Whether to try validating the template on initialization

Inherited fromBasePromptTemplateInput

Properties

PinputVariables: Extract<keyof RunInput, string>[]PoutputParser: JsonOutputFunctionsParser<Record<string, any>>PpartialVariables: PartialValues
View source on GitHub