UNPKG

@promptbook/vercel

Version:

Promptbook: Turn your company's scattered knowledge into AI ready books

41 lines (40 loc) 1.64 kB
import type { ReadonlyDeep } from 'type-fest'; import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson'; import type { TaskJson } from '../../pipeline/PipelineJson/TaskJson'; import type { Parameters, string_markdown, string_parameter_value } from '../../types/typeAliases'; import type { ExecutionTools } from '../ExecutionTools'; /** * Options for retrieving relevant knowledge for a specific task during pipeline execution. * * @private internal type of `getKnowledgeForTask` */ type GetKnowledgeForTaskOptions = { /** * The execution tools to be used during the execution of the pipeline. */ readonly tools: ExecutionTools; /** * The fully prepared pipeline containing all tasks and knowledge pieces. */ readonly preparedPipeline: ReadonlyDeep<PipelineJson>; /** * The current task for which knowledge is being retrieved. */ readonly task: ReadonlyDeep<TaskJson>; /** * Parameters used to complete the content of the task for embedding and knowledge retrieval. */ readonly parameters: Readonly<Parameters>; }; /** * Retrieves the most relevant knowledge pieces for a given task using embedding-based similarity search. * This is where retrieval-augmented generation (RAG) is performed to enhance the task with external knowledge. * * @private internal utility of `createPipelineExecutor` */ export declare function getKnowledgeForTask(options: GetKnowledgeForTaskOptions): Promise<string_parameter_value & string_markdown>; export {}; /** * TODO: [♨] Implement Better - use keyword search * TODO: [♨] Examples of values */