Whatever message this page gives is out now! Go check it out!
Provider | Model name | Output dimension / notes |
OpenAI | text-embedding-3-small | 1536 dimensions (default). Cost-effective and high quality. |
OpenAI | text-embedding-ada-002 | 1536 dimensions. Previous generation; still widely used. |
Ollama (local) | all-minilm | 384 dimensions. Set dimension: 384 in Milvus and Qdrant configs when using this model. |
<cfscript>
ragService = simpleRAG(
[
application.getDocumentsDir() & "pdf",
application.getDocumentsDir() & "txt"
],
chatModel,
{ vectorStore: vectorStore }
);
ragService.ingest();
</cfscript><cfscript>
sharedVS = VectorStore({
provider: "INMEMORY",
embeddingModel: {
provider: "ollama",
modelName: "all-minilm",
baseUrl: application.ollamaBaseUrl
}
});
svc = agent({
CHATMODEL: chatModel,
ingestion: {
source: expandPath("./Documents/test.txt"),
documentSplitter: { chunkSize: 500, chunkOverlap: 100 },
vectorStoreIngestor: { vectorStore: sharedVS }
},
retrievalAugmentor: {
queryRouter: {
contentRetrievers: [{
vectorStore: sharedVS,
maxResults: 5,
minScore: 0.3,
description: "Knowledge base"
}]
}
}
});
svc.ingest();
answer = svc.chat("Your question");
</cfscript>Parameter | Description |
provider | Set to "INMEMORY". |
embeddingModel | Nested struct defining the provider, model name, and API key for generating embeddings. |
<cfscript>
chatModel = ChatModel({
provider: "openai",
modelName: "gpt-4o-mini",
apiKey: application.apiKey,
temperature: 0.7
});
vectorStore = VectorStore({
provider: "INMEMORY",
embeddingModel: {
provider: "openai",
modelName: "text-embedding-3-small",
apiKey: application.apiKey
}
});
docsDir = expandPath("./docs/");
ragService = simpleRAG(
expandPath("./docs/"),
chatModel,
{ vectorStore: vectorStore, recursive: true, chunkSize: 200, chunkOverlap: 50 }
);
ragService.ingest();
answer = ragService.chat("How to update TIN?");
writeOutput(answer.message);
</cfscript>Parameter | Description |
provider | Set to "chroma". |
url | URL of the Chroma server. |
databaseName | Name of the Chroma database. |
tenantName | Chroma tenant name. |
collectionName | Collection to store and retrieve vectors. Use a unique name per run to avoid index collisions. |
embeddingModel | Nested struct: provider, modelName, and connection details (e.g. baseUrl for Ollama). |
<cfscript>
vectorStoreClient = VectorStore({
provider: "chroma",
url: application.vectorDB.chroma.url,
databaseName: application.vectorDB.chroma.databaseName,
tenantName: application.vectorDB.chroma.tenantName,
collectionName: "simplerag_nested_test_" & dateFormat(now(), "yyyymmdd"),
embeddingModel: {
provider: "ollama",
modelName: "all-minilm",
baseUrl: application.ollamaBaseUrl
}
});
ragService = simpleRAG(
expandPath("./Documents/nested"),
chatModel,
{
vectorStore: vectorStoreClient,
recursive: true,
continueOnError: false,
chunkSize: 200,
chunkOverlap: 50
}
);
ragService.ingest();
</cfscript>Parameter | Description |
provider | Set to "qdrant". |
url | gRPC URL of the Qdrant server. |
apiKey | API key for authenticating with Qdrant. |
collectionName | Collection name. Use a unique name per run to avoid collisions. |
metricType | Similarity metric. Typically "COSINE". |
dimension | Vector dimension. Must match the embedding model output — set 384 for all-minilm. |
embeddingModel | Nested struct: provider, modelName, and connection details. |
<cfscript>
vectorStore = {
provider: "qdrant",
url: application.vectorDB.qdrant.grpcUrl,
apiKey: application.vectorDB.qdrant.apiKey,
collectionName: "simplerag_nested_test_" & dateFormat(now(), "yyyymmdd"),
metricType: "COSINE",
dimension: 384,
embeddingModel: {
provider: "ollama",
modelName: "all-minilm",
baseUrl: application.ollamaBaseUrl
}
};
ragService = simpleRAG(
expandPath("./Documents/nested"),
chatModel,
{ vectorStore: vectorStore, recursive: true, chunkSize: 200, chunkOverlap: 50 }
);
ragService.ingest();
</cfscript>Parameter | Description |
provider | Set to "milvus". |
url | gRPC URL of the Milvus server. |
databaseName | Milvus database name. Typically "default". |
collectionName | Collection name. Use a unique name per run. |
dimension | Vector dimension. Must match embedding model output — set 384 for all-minilm. |
indexType | Index algorithm. Typically "HNSW" for approximate nearest-neighbour search. |
metricType | Similarity metric. Typically "COSINE". |
embeddingModel | Nested struct: provider, modelName, and connection details. |
<cfscript>
vectorStore = {
provider: "milvus",
url: application.vectorDB.milvus.grpcUrl,
databaseName: "default",
collectionName: "simplerag_nested_test_" & dateFormat(now(), "yyyymmdd"),
dimension: 384,
indexType: "HNSW",
metricType: "COSINE",
embeddingModel: {
provider: "ollama",
modelName: "all-minilm",
baseUrl: application.ollamaBaseUrl
}
};
ragService = simpleRAG(
expandPath("./Documents/nested"),
chatModel,
{ vectorStore: vectorStore, recursive: true, chunkSize: 200, chunkOverlap: 50 }
);
ragService.ingest();
</cfscript>Parameter | Description |
provider | Set to "pinecone". |
apiKey | Pinecone API key. |
index | Name of the Pinecone index. |
serverless | Nested struct for serverless configuration: • dimension: vector dimension (must match embedding model). • cloud: cloud provider (e.g. aws). • region: deployment region. • deletionProtection: set to "disabled" to allow cleanup. |
embeddingModel | Nested struct: provider, modelName, and connection details. |
<cfscript>
vectorStore = VectorStore({
provider: "pinecone",
apiKey: application.vectorDB.pinecone.apiKey,
index: application.vectorDB.pinecone.index,
serverless: {
dimension: application.vectorDB.pinecone.serverless.dimension,
cloud: application.vectorDB.pinecone.serverless.cloud,
region: application.vectorDB.pinecone.serverless.region,
deletionProtection: "disabled"
},
embeddingModel: {
provider: "ollama",
modelName: "all-minilm",
baseUrl: application.ollamaBaseUrl
}
});
ragService = simpleRAG(
expandPath("./Documents/nested"),
chatModel,
{ vectorStore: vectorStore, recursive: true, chunkSize: 200, chunkOverlap: 50 }
);
ragService.ingest();
vectorStore.deleteCollection();
</cfscript>Parameter | Description |
segments | Array of segment structs returned by split(). Each segment has text and metadata. |
vectorStoreClient | A configured VectorStore object to write embeddings into. |
batchSize | How many segments to embed and write per internal batch. Higher values can improve throughput but increase memory use. |
continueOnError | When true, ingestion skips or logs failed segments and continues. When false, the job stops on the first error. |
<cfscript>
docService = documentService();
documents = docService.load({
path: application.getDocumentsDir(),
pattern: "*.txt"
});
segments = docService.split(documents, { chunkSize: 500, chunkOverlap: 50 });
vectorStoreClient = VectorStore({
provider: "qdrant",
url: application.vectorDB.qdrant.grpcUrl,
apiKey: application.vectorDB.qdrant.apiKey,
collectionName: "dps_ingest_qdrant_test",
metricType: "COSINE",
dimension: 384,
embeddingModel: {
provider: "ollama",
modelName: "all-minilm",
baseUrl: application.ollamaBaseUrl
}
});
result = docService.ingest(segments, vectorStoreClient, {
batchSize: 50,
continueOnError: true
});
writeOutput(result.segmentsIngested & " ingested, " & result.segmentsFailed & " failed");
</cfscript>