GenAI query classes
The FileNet P8 Content Engine Java™ and .NET APIs or the FileNet P8 Content Services GraphQL API supports the following Content Engine classes:
GenaiBaseQueryThe
GenaiBaseQueryclass enables an API caller to submit a question and generate a response from the watsonx LLM. The base class can be used directly but it does not allow the question to be augmented with document context. For more information, seeGenaiBaseQueryclass in the FNCM documentation.GenaiVectorQueryThe
GenaiVectorQueryclass inherits from theGenaiBaseQueryclass. It enables an API caller to perform a vector query across the vector index for an entire object store. Before any of the document chunks are used for LLM inferencing, or returned to the caller, the Content Platform Engine server verifies whether the caller hasVIEW_CONTENTpermissions for the underlying documents. The set of documents that most closely match the input prompt are then returned. For more information, seeGenaiVectorQueryclass in the FNCM documentation.GenaiDocumentQueryThe class inherits from the
GenaiVectorQueryclass. It enables an API caller to perform a vector query that is filtered to include chunks from a single document. The Content Platform Engine server verifies whether the call hasVIEW_CONTENTaccess for the underlying document. The set of document chunks that most closely match the input prompt are then returned. For more information, seeGenaiDocumentQueryclass in the FNCM documentation.GenaiMultiDocumentQueryThe class inherits from the
GenaiVectorQueryclass. It enables an API caller to perform a vector query that is filtered to include chunks from a specified document list. The Content Platform Engine server verifies whether the call hasVIEW_CONTENTaccess for the specified documents. The set of document chunks that most closely match the input prompt are then returned. For more information, seeGenaiMultiDocumentQueryclass in the FNCM documentation.GenaiAdhocSummaryThe
GenaiAdhocSummaryclass inherits from theGenaiBaseQueryclass. The class takes a list of documents as input and generates the watsonx summary for the documents by passing a subset of the document content to the LLM. The amount of text taken from each input document depends on the number of input documents and the LLM context window.GenaiDocumentComparisonThe
GenaiDocumentComparisonclass inherits from theGenaiBaseQueryclass. This class can be used to compare two document versions. These can be two versions of the same document, or document versions from two different documents. The caller must haveVIEW_CONTENTaccess to both documents. The caller may specify additional instructions that specify how watsonx.ai should perform the comparison.