Class: QuestionsAnsweredExtractor()
Extract questions from a list of nodes.
Extends
QuestionsAnsweredExtractor<
Options
>(nodes
,options
?):Promise
<BaseNode
<Metadata
>[]>
Extract questions from a list of nodes.
Type Parameters
• Options extends Record
<string
, unknown
>
Parameters
• options?: Options
Returns
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:293
Constructors
new QuestionsAnsweredExtractor()
new QuestionsAnsweredExtractor(
options
?):QuestionsAnsweredExtractor
Constructor for the QuestionsAnsweredExtractor class.
Parameters
• options?: QuestionAnswerExtractArgs
Returns
Overrides
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:327
Properties
disableTemplateRewrite
disableTemplateRewrite:
boolean
=false
Inherited from
BaseExtractor
.disableTemplateRewrite
Defined in
packages/llamaindex/src/extractors/types.ts:16
embeddingOnly
embeddingOnly:
boolean
=false
Wheter to use metadata for embeddings only
Default
false
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:318
id
id:
string
Inherited from
Defined in
packages/core/schema/dist/index.d.ts:171
inPlace
inPlace:
boolean
=true
Inherited from
Defined in
packages/llamaindex/src/extractors/types.ts:17
isTextNodeOnly
isTextNodeOnly:
boolean
=true
Inherited from
Defined in
packages/llamaindex/src/extractors/types.ts:13
llm
llm:
LLM
<object
,object
>
LLM instance.
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:298
metadataMode
metadataMode:
MetadataMode
=MetadataMode.ALL
Inherited from
Defined in
packages/llamaindex/src/extractors/types.ts:15
numWorkers
numWorkers:
number
=4
Inherited from
Defined in
packages/llamaindex/src/extractors/types.ts:18
promptTemplate
promptTemplate:
QuestionExtractPrompt
The prompt template to use for the question extractor.
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:311
questions
questions:
number
=5
Number of questions to generate.
Default
5
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:305
showProgress
showProgress:
boolean
=true
Inherited from
Defined in
packages/llamaindex/src/extractors/types.ts:14
Methods
extract()
extract(
nodes
):Promise
<object
[] |ExtractQuestion
[]>
Extract answered questions from a list of nodes.
Parameters
Nodes to extract questions from.