Skip to content

LLMSingleSelector

Defined in: .build/typescript/packages/llamaindex/src/selectors/llmSelectors.ts:122

A selector that uses the LLM to select a single choice from a list of choices.

new LLMSingleSelector(init): LLMSingleSelector

Defined in: .build/typescript/packages/llamaindex/src/selectors/llmSelectors.ts:127

LLM

SingleSelectPrompt

BaseOutputParser<StructuredOutput<Answer[]>>

LLMSingleSelector

BaseSelector.constructor

llm: LLM

Defined in: .build/typescript/packages/llamaindex/src/selectors/llmSelectors.ts:123


prompt: SingleSelectPrompt

Defined in: .build/typescript/packages/llamaindex/src/selectors/llmSelectors.ts:124


outputParser: BaseOutputParser<StructuredOutput<Answer[]>>

Defined in: .build/typescript/packages/llamaindex/src/selectors/llmSelectors.ts:125

select(choices, query): Promise<SelectorResult>

Defined in: .build/typescript/packages/llamaindex/src/selectors/base.ts:27

MetadataType[]

QueryType

Promise<SelectorResult>

BaseSelector.select


_getPrompts(): Record<string, SingleSelectPrompt>

Defined in: .build/typescript/packages/llamaindex/src/selectors/llmSelectors.ts:138

Record<string, SingleSelectPrompt>

BaseSelector._getPrompts


_updatePrompts(prompts): void

Defined in: .build/typescript/packages/llamaindex/src/selectors/llmSelectors.ts:142

Record<string, SingleSelectPrompt>

void

BaseSelector._updatePrompts


_select(choices, query): Promise<SelectorResult>

Defined in: .build/typescript/packages/llamaindex/src/selectors/llmSelectors.ts:153

Selects a single choice from a list of choices.

ToolMetadataOnlyDescription[]

QueryBundle

Promise<SelectorResult>

BaseSelector._select


asQueryComponent(): unknown

Defined in: .build/typescript/packages/llamaindex/src/selectors/llmSelectors.ts:180

unknown


protected _getPromptModules(): object

Defined in: .build/typescript/packages/llamaindex/src/selectors/llmSelectors.ts:184

Return a dictionary of sub-modules within the current module that also implement PromptMixin (so that their prompts can also be get/set).

Can be blank if no sub-modules.

object

BaseSelector._getPromptModules