RAG Apps API

Dataworkz API to RAG Apps - to perform QnA, Search and Chat.

Dataworkz RAG Applications can be created over multi-modal data (images, text, etc) with different formats (pdf, powerpoints, etc) from different sources (Google Drive, Sharepoint, etc). RAG Applications can be utilized for multiple use-cases

  • QnA: Allow users to ask questions in natural language and leverage the power of RAG to respond with answers from the underlying data corpus

  • Enterprise Search: Allow users to perform semantic search over the underlying data corpus

  • Chat with the data: Allow users to have a conversation with the underlying data corpus. (Note: this is not the Agents API)

Note: All API calls require an API Token. Please follow these steps to generate an API Key. The API Key has to be provided in the Authorizationheader in the format SSWS <your api key>

API

Get all QnA systems configured in this account

get

Returns a map containing unique identifier and name for all QnA systems that have been set up in Dataworkz

Authorizations
AuthorizationstringRequired

Token

Header parameters
AuthorizationanyOptional

For Dataworkz API Token use the format 'SSWS ' and for OAuth2 generated JWT token use 'Bearer '

Responses
chevron-right
200

successful operation

application/json
Responseobject
get
/qna/v1/systems
200

successful operation

Get details of a specific QnA system

get

Get details of a specific QnA system

Authorizations
AuthorizationstringRequired

Token

Path parameters
systemIdstringRequired

Id of the QnA system

Example: 3756809c-4032-4e48-b3f0-2a6d30a03a54
Header parameters
AuthorizationanyOptional

For Dataworkz API Token use the format 'SSWS ' and for OAuth2 generated JWT token use 'Bearer '

Responses
chevron-right
200

successful operation

application/json
get
/qna/v1/systems/{systemId}
200

successful operation

Get LLM providers configured for a given QnA system

get

Returns a map containing unique identifier and LLM models that have been configured for a given QnA system

Authorizations
AuthorizationstringRequired

Token

Path parameters
systemIdstringRequired

Id of the QnA system

Example: 3756809c-4032-4e48-b3f0-2a6d30a03a54
Header parameters
AuthorizationanyOptional

For Dataworkz API Token use the format 'SSWS ' and for OAuth2 generated JWT token use 'Bearer '

Responses
chevron-right
200

successful operation

application/json
Responseobject
get
/qna/v1/systems/{systemId}/llm-providers
200

successful operation

get

Get a list of search results from the configured system that semantically match the query asked based on similarity with the data corpus configured for that QnA system. You can pass filter expressions to control the data retrieval process. Optionally, flags can be passed to configure the RAG engine behaviour. Each request is associated with an id to perform additional actions later.

Authorizations
AuthorizationstringRequired

Token

Path parameters
systemIdstringRequired

Id of the QnA system

Example: 3756809c-4032-4e48-b3f0-2a6d30a03a54
Query parameters
querystringRequired

search query terms

Example: Example to join 2 datasets in S3 and write the output to MongoDB
llmProviderIdstringOptional

Id of the LLM to use. This has to be from the list configured in the pipeline. Id can be retrieved using /systems/{systemId}/llm-providers api or copied from the LLM Configuration page. Will only be used if required.

Example: 774c246b-a079-4fa5-b3dc-4a82b35aa258
filterstringOptional

Filter expression to apply to data retrieval

Example: version in ('1.2', '2.0')
propertiesstringOptional

Flags to control behaviour. Format is Key=value pairs separated by ; Supported flags - include_probe : Default is true. Set to false to disable returning probe data with request

Example: include_probe=false;context=3
Header parameters
AuthorizationanyOptional

For Dataworkz API Token use the format 'SSWS ' and for OAuth2 generated JWT token use 'Bearer '

Responses
chevron-right
200

successful operation. Fields - question - the question asked questionUuid - the unique id associated with this question - can be used in insights, etc searchResultsList - the search results linksCount - the number of results with a link pdfCount - the number of pdf doc results wordCount - the number of word doc results textCount - the number of text doc results systemName - the name of the RAGApp systemId - the unique id of the RAGApp status - the status of the query failureReason - if failed, the failure reason queryPlan - the query plan that was applied appliedFilters - any filters that were finally applied for retrieval inputFilters - any filters that were user specified extractedFilters - any filters that were extracted from the question

application/json
Responseobject
get
/qna/v1/systems/{systemId}/search
200

successful operation. Fields - question - the question asked questionUuid - the unique id associated with this question - can be used in insights, etc searchResultsList - the search results linksCount - the number of results with a link pdfCount - the number of pdf doc results wordCount - the number of word doc results textCount - the number of text doc results systemName - the name of the RAGApp systemId - the unique id of the RAGApp status - the status of the query failureReason - if failed, the failure reason queryPlan - the query plan that was applied appliedFilters - any filters that were finally applied for retrieval inputFilters - any filters that were user specified extractedFilters - any filters that were extracted from the question

Get answer to the question asked

get

Ask a question to a specific QnA system and leverage RAG techniques to get the question answered based on the data corpus configured for that QnA system. You should specify the LLM to use from the ones configured for this QnA system. You can pass filter expressions to control the data retrieval process. Optionally, flags can be passed to configure the RAG engine behaviour. Each request is associated with an id to perform additional actions later.

Authorizations
AuthorizationstringRequired

Token

Path parameters
systemIdstringRequired

Id of the QnA system

Example: 3756809c-4032-4e48-b3f0-2a6d30a03a54
Query parameters
questionTextstringRequired

Text of the question asked to the QnA system. Must be url encoded.

Example: Example to join 2 datasets in S3 and write the output to MongoDB
llmProviderIdstringRequired

Id of the LLM to use. This has to be from the list configured in the pipeline. Id can be retrieved using /systems/{systemId}/llm-providers api or copied from the LLM Configuration page.

Example: 774c246b-a079-4fa5-b3dc-4a82b35aa258
filterstringOptional

Filter expression to apply to data retrieval

Example: version in ('1.2', '2.0')
propertiesstringOptional

Flags to control behaviour. Format is Key=value pairs separated by ; Supported flags - include_probe : Default is true. Set to false to disable returning probe data with request

Example: include_probe=false;context=3
Header parameters
AuthorizationanyOptional

For Dataworkz API Token use the format 'SSWS ' and for OAuth2 generated JWT token use 'Bearer '

Responses
chevron-right
200

successful operation. Fields - question - the question asked questionUuid - the unique id associated with this question - can be used in insights, etc answer - the answer from the RAG system context - the contexts retrieved used to answer the question systemName - the name of the RAGApp systemId - the unique id of the RAGApp status - the status of the query failureReason - if failed, the failure reason queryPlan - the query plan that was applied appliedFilters - any filters that were finally applied for retrieval inputFilters - any filters that were user specified extractedFilters - any filters that were extracted from the question

application/json
Responseobject
get
/qna/v1/systems/{systemId}/answer
200

successful operation. Fields - question - the question asked questionUuid - the unique id associated with this question - can be used in insights, etc answer - the answer from the RAG system context - the contexts retrieved used to answer the question systemName - the name of the RAGApp systemId - the unique id of the RAGApp status - the status of the query failureReason - if failed, the failure reason queryPlan - the query plan that was applied appliedFilters - any filters that were finally applied for retrieval inputFilters - any filters that were user specified extractedFilters - any filters that were extracted from the question

Get list of all filters with metadata

get

Get a list of all filters associated with this system and their metadata which includes their datatype, cardinality and values (for low cardinality filters)

Authorizations
AuthorizationstringRequired

Token

Path parameters
systemIdstringRequired

Id of the QnA system

Example: 3756809c-4032-4e48-b3f0-2a6d30a03a54
Header parameters
AuthorizationanyOptional

For Dataworkz API Token use the format 'SSWS ' and for OAuth2 generated JWT token use 'Bearer '

Responses
chevron-right
200

successful operation

application/json
Responseobject
get
/qna/v1/systems/{systemId}/filters
200

successful operation

Get data for a document in this system's dataset

get

Get data for a document in this system's dataset

Authorizations
AuthorizationstringRequired

Token

Path parameters
systemIdstringRequired

Id of the QnA system

Example: 3756809c-4032-4e48-b3f0-2a6d30a03a54
Query parameters
documentIdstringRequired

Id of the document from the dataset

detailstringOptional

Detail associated with the document data request

Example: 12`1`1`10`20
Header parameters
AuthorizationanyOptional

For Dataworkz API Token use the format 'SSWS ' and for OAuth2 generated JWT token use 'Bearer '

Responses
chevron-right
200

successful operation

No content

get
/qna/v1/systems/{systemId}/document
200

successful operation

No content

Last updated