Configuring the Command document for RAG

Use the existing Command document in dominoiq.nsf, described in the topic Adding an LLM Command document, to specify the new RAG fields.

Table 1. RAG Command fields
Field Action
RAG enabled database The database name, with path relative to data directory on Domino IQ server.

The database needs to be replicated to the Domino IQ server or servers which are specified in the Command document.

RAG enabled fields A list of field names that will be converted into embeddings and stored in vector database.
Note: If you configure multiple commands for a given RAG vector database, and a command includes field names specific to it, when that command is run, data from all field names associated with the other commands will be processed as well.
RAG maximum responses The limit of maximum semantic search responses that could be retrieved from the vector database for the user prompt and applied to the RAG context sent to the LLM . The default is 25.
RAG threshold The minimum score for semantic search that could be retrieved from the vector database for the user prompt. The defaults is 0.7
Maximum tokens The limit on the number of tokens sent to the LLM. This should be increased to fit larger prompts sent when enabled for RAG.
Note: The RAG fields should be comma separated.

The corresponding system prompt document for this command can be tweaked to indicate whether you want the AI engine to respond with a specific response if there are no matches found in the RAG source database.

RAG-based LLM Request methods honor the Database ACL and ReaderList fields in the documents of the RAG source database before adding it to the context that is sent to the LLM.

What to do next:

Launching Domino IQ tasks for RAG support