コンテンツにスキップ

Craft RAG

const { rag } = MODULES;

Table of Contents


Schemas

RetrieveResultValue

Type: Object

Properties

  • filePath string Source file path.
  • text string The text chunk.
  • distance number The distance between the query dense embedding vector and the context text vector.

Methods

retrieveContexts

Parameters

  • param Object

    • param.corpusId string RAG Id
    • param.text string The query text to get relevant contexts.
    • param.vectorDistanceThreshold number Only contexts with a vector distance smaller than the threshold are returned.

Returns Promise<RetrieveResultValue>