Skip to content

Knowledge (RAG) Settings

Copy page

Most settings in this group point at something you build elsewhere. A Release does not hold a knowledge base; it references one. Build the vector first — see RAG Knowledge Base for creating one, choosing an embedding model, and feeding it by upload, crawl, or product-catalog sync.

SettingFieldIn the SDK?
Vectors / vector groupragIndexes, ragVectorGroupId
Recency weightingragRecency
Max context chunksrerankMaxChunks
Retrieval gateragTrigger
Citation displayragContextDisplayMode
Product sub-repliesproductSubReplies
Workflow pipelinesoutputPipelineId, productOutputPipelineId
Memorymemory❌ — and see the caveat

Two mutually exclusive ways to attach:

// Individual vectors
await divinci.releases.updateInWorkspace(workspaceId, releaseId, {
ragIndexes: [{ id: "vec_abc" }, { id: "vec_def" }],
});

Or one vector group — a saved bundle with its own merge policy, set through ragVectorGroupId. Picking a group disables the individual list: it is one or the other, not both.

A group is created on the RAG vectors page (Groups tab) and carries:

FieldDefaultMeaning
ragVectorIdsOrdered, minimum 2
mergeStrategyinterleaveinterleave alternates chunks so every vector gets a voice; concatenate takes them in order
maxChunksPerVector3Caps how much any one vector contributes

Reach for interleave when the vectors are peers and you want balanced coverage; concatenate when the order expresses priority and you want the first vector to dominate.

Lets newer content outrank older matches. Defaults, once enabled: weight 0.3, half-life 180 days — a document loses half its recency boost every six months. Unset at the Release level, resolution falls through to the vector’s own setting.

Worth turning on for changelogs, news, or policy docs where stale answers are wrong answers; leave it off for reference material where age is irrelevant and recency weighting would just distort ranking.

rerankMaxChunks caps how many retrieved chunks survive the cross-index merge-rerank and reach the prompt.

ValueEffect
unsetPlatform default of 8
nAt most n chunks
0Disables the trim entirely

Lower means fewer prompt tokens and faster prefill, at the cost of fewer grounding sources. Note 0 does not mean “no chunks” — it means “no cap”, which is the opposite of what the number suggests.

ragTrigger decides whether retrieval runs at all for a turn:

await divinci.releases.updateInWorkspace(workspaceId, releaseId, {
ragTrigger: { mode: "heuristic", minChars: 4 },
});

heuristic skips retrieval for messages that plainly need no grounding — greetings, acknowledgements, chit-chat — saving both latency and prompt tokens. always (the default) always retrieves. minChars is the trimmed-length floor below which a message skips, and skipPatterns adds case-insensitive regexes on top of the built-in greeting set.

Purely cosmetic — what the source citations under a reply look like:

ragContextDisplayModeShows
fullTitle with hover preview
titleTitle only
hiddenNothing

This changes presentation only. It does not affect what was retrieved, what reached the model, or what it answered.

When a reply mentions something from your product catalog, the server can decorate the mention inline and spawn a follow-up product card. The catalog itself is built on its own page — imported from a file or synced from WooCommerce, Shopify, or Squarespace.

await divinci.releases.updateInWorkspace(workspaceId, releaseId, {
productSubReplies: {
enabled: true,
maxProducts: 1,
matchThreshold: 0.5,
retroMatch: { enabled: true, mode: "name-mention" },
},
});

retroMatch scans the model’s finished reply for products it named, even when the product’s chunk was not retrieved that turn. Its mode is the precision dial:

ModeBehaviour
name-mention (default)The product name must literally appear. Highest precision
bm25-fullRanks over name + keywords + description. Higher recall, more false positives on common domain words
rag-candidatesOnly products retrieval surfaced this turn. Never invents one the retriever did not see

outputPipelineId and productOutputPipelineId point at visual node-canvas pipelines that post-process how retrieval and responses are assembled. Every Release ships with a simple RAG default; branch from it when you need logic the flat settings above cannot express.

  • A vector group and individual vectors are exclusive. Setting a group disables the list; do not expect the union.
  • A group needs at least two vectors. One vector is just a vector.
  • rerankMaxChunks: 0 disables the cap, not retrieval. If you want less context, use a small number, not zero.
  • Citation display is not a privacy control. hidden stops rendering sources; it does not stop them being retrieved or sent to the model. To restrict what the model sees, change what is attached.
  • Retrieval quality changes when de-identification is on. Queries run against the redacted message, so a corpus keyed on names, dates, or locations loses recall. Test retrieval with de-identification enabled, not before.