Skip to content

formatLLM

formatLLM(nodes): string

Defined in: packages/core/src/utils/index.ts:107

Formats an array of NodeWithScore objects into a string suitable for LLM consumption. Extracts content from each node using MetadataMode.LLM and joins them with newlines.

NodeWithScore<Metadata>[]

Array of nodes with scores from a retriever

string

Joined content string, or empty string if no nodes