问题
QuestionsAnsweredExtractor #
基础: BaseExtractor
问答提取器。节点级别提取器。提取 questions_this_excerpt_can_answer
元数据字段。
参数
名称 | 类型 | 描述 | 默认值 |
---|---|---|---|
llm
|
可选[LLM]
|
LLM |
必填 |
questions
|
int
|
要提取的问题数量 |
5
|
prompt_template
|
str
|
问题提取模板, |
'Here is the context:\n{context_str}\n\nGiven the contextual information, generate {num_questions} questions this context can provide specific answers to which are unlikely to be found elsewhere.\n\nHigher-level summaries of surrounding context may be provided as well. Try using these summaries to generate better questions that this context can answer.\n\n'
|
embedding_only
|
bool
|
是否只使用嵌入 |
True
|
源代码位于 llama-index-core/llama_index/core/extractors/metadata_extractors.py
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 |
|