simpleRAG

Creates a retrieval-augmented generation (RAG) service that answers questions about your documents. Use its ask() method to query it.

simpleRAG(source, model [, options]) → returns any

This function requires Adobe ColdFusion 2025.0.8 and up.  Not supported on Lucee, etc.

Argument Reference

source any
Required

A file path, directory, URL, or an array of these, to load documents from.

model any
Required

A chat model from chatModel(), or a struct of chat model settings.

options struct

Struct of settings such as chunkSize, chunkOverlap, splitterType, maxResults, minScore, vectorStore and batchSize.

Examples
Sample code invoking the simpleRAG function

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub