RAG

Retrieval, generative answer, and highlight related APIs

Get Highlight

get
/webapi/v2/highlights/{clue_id}
Authorizations
API-KEYstringRequired

Your API key for authentication

Path parameters
clue_idstringRequired
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
chevron-right
200

OK

application/json
typestring · enumRequired

Enum representing different types of answers that can be provided.

Possible values:
get
/webapi/v2/highlights/{clue_id}
200

OK

Rare Status

get
/webapi/v2/rare/status

Get RARE build/generate status for the project.

Authorizations
API-KEYstringRequired

Your API key for authentication

Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
chevron-right
200

OK

application/json
build_statusstringRequired
job_statusstringRequired
job_typestringRequired
build_run_idany ofOptional
stringOptional
or
nullOptional
error_messageany ofOptional
stringOptional
or
nullOptional
build_progressany ofOptional
or
nullOptional
generate_progressany ofOptional
or
nullOptional
build_statsany ofOptional
or
nullOptional
generate_statsany ofOptional
or
nullOptional
folder_idsany ofOptional
string[]Optional
or
nullOptional
default_modelstringOptionalDefault: ""
generation_modelstringOptionalDefault: ""
get
/webapi/v2/rare/status
200

OK

Rare Build

post
/webapi/v2/rare/build

Start RARE build task.

Authorizations
API-KEYstringRequired

Your API key for authentication

Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
languagestringOptionalDefault: Korean
default_modelstringOptionalDefault: gpt54_nano
similarity_thresholdnumberOptionalDefault: 0.5
top_k_per_chunkintegerOptionalDefault: 1
max_similar_itemsintegerOptionalDefault: 256
max_workersintegerOptionalDefault: 100
folder_idsany ofOptional
string[]Optional
or
nullOptional
Responses
chevron-right
200

OK

application/json
messagestringRequired
task_idstringRequired
post
/webapi/v2/rare/build
200

OK

Rare Generate

post
/webapi/v2/rare/generate

Start RARE generate task. Requires build to be completed first.

Authorizations
API-KEYstringRequired

Your API key for authentication

Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
num_samplesintegerOptionalDefault: 10
input_pool_sizeintegerOptionalDefault: 50
num_questionsintegerOptionalDefault: 10
num_informationintegerOptionalDefault: 2
languagestringOptionalDefault: Korean
default_modelstringOptionalDefault: gpt54_nano
generation_modelstringOptionalDefault: gpt54
rare_user_promptstringOptionalDefault: ""
Responses
chevron-right
200

OK

application/json
messagestringRequired
task_idstringRequired
post
/webapi/v2/rare/generate
200

OK

Rare Cancel

post
/webapi/v2/rare/cancel

Request cooperative cancellation for a running RARE job.

Authorizations
API-KEYstringRequired

Your API key for authentication

Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
chevron-right
200

OK

application/json
messagestringRequired
task_idstringRequired
post
/webapi/v2/rare/cancel
200

OK

Rare Results

get
/webapi/v2/rare/results

List recent RARE generate results for the project.

Authorizations
API-KEYstringRequired

Your API key for authentication

Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
chevron-right
200

OK

application/json
get
/webapi/v2/rare/results
200

OK

Rare Delete Result

delete
/webapi/v2/rare/results/{result_id}

Delete a RARE generate result by ID.

Authorizations
API-KEYstringRequired

Your API key for authentication

Path parameters
result_idstringRequired
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
chevron-right
200

OK

No content

delete
/webapi/v2/rare/results/{result_id}
200

OK

No content

Rare Csv

get
/webapi/v2/rare/csv

Proxy RARE CSV file from storage. Returns JSON with headers + rows.

Authorizations
API-KEYstringRequired

Your API key for authentication

Query parameters
pathstringOptionalDefault: ""
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
chevron-right
200

OK

No content

get
/webapi/v2/rare/csv
200

OK

No content

Run Bulk

post
/webapi/v2/bulk_processing/run

Start bulk processing (GA or RAG).

Args: file: CSV file with columns: question, model, search_type. Optional: target_answer, target_clue, hashtag, folder. bulk_type: "ga" (default) or "rag"

Authorizations
API-KEYstringRequired

Your API key for authentication

Query parameters
bulk_typestring · enumOptionalDefault: gaPossible values:
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
filestring · binaryRequired
Responses
chevron-right
200

OK

No content

post
/webapi/v2/bulk_processing/run
200

OK

No content

List Results

get
/webapi/v2/bulk_processing/results

List bulk processing results (GA + RAG combined, paginated).

Authorizations
API-KEYstringRequired

Your API key for authentication

Query parameters
pageintegerOptionalDefault: 1
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
chevron-right
200

OK

No content

get
/webapi/v2/bulk_processing/results
200

OK

No content

Download Result

get
/webapi/v2/bulk_processing/download

Download a bulk processing result CSV.

Authorizations
API-KEYstringRequired

Your API key for authentication

Query parameters
file_urlstringRequired
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
chevron-right
200

OK

No content

get
/webapi/v2/bulk_processing/download
200

OK

No content

Delete Result

delete
/webapi/v2/bulk_processing/results/{result_id}

Delete a bulk processing result (GA or RAG) by ID.

Authorizations
API-KEYstringRequired

Your API key for authentication

Path parameters
result_idstringRequired
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
chevron-right
200

OK

No content

delete
/webapi/v2/bulk_processing/results/{result_id}
200

OK

No content

Generative Answer API

post
/webapi/generative_answer

Generative Answer API finds an answer from your unstructured text documents, Q&A, and even from complex tables. It synthesizes information from various sources to provide comprehensive responses to user queries.

Authorizations
API-KEYstringRequired

Your API key for authentication

Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
querystringOptional

This is a query string.

modelstringOptional

Utilize the LLM of your choice when generating answers. Default model is GPT4o. Please see documentation for available options.

answerFormatstringOptional

Determine the format of the response given for easier integrations. Acceptable values are DRAFTJS and MARKDOWN. Default format is DRAFTJS.

isStatefulbooleanOptional

To use follow-up question, previous conversation history is required. The conversation history is managed by threadId. If you set isStateful option to True and enter a threadId, the query will be rewritten with reference to the previous conversation history. Default = False.

threadIdstring · uuidOptional

threadId is used when isStateful = True. The first time you start a conversation, send it empty, and from the next query on, send it using the threadId from the output. However, if you want to set the threadId from the beginning, write it as a UUID and send it. Example UUID - 36e7bb2b-1063-47ec-. Default = None.

promptGroupIdstringOptional

Select which group prompt from your project to use for generating responses. The ID is located within the URL when viewing the group prompt within the Settings page. This is a very helpful option for a project with multiple different group prompts that are altered for specific tasks.

modestringOptional

Whether to output data as stream or sync. Current available values: sync OR stream (default=sync). When in stream mode, .json strings with the same output format as sync are outputted as streaming.

clueTextbooleanOptional

Whether to include the text of the document used as a clue. Default = False. ONLY works if clues is enabled.

cluesbooleanOptional

Whether to include clues in the output that will be used to create a generative answer. Default = False.

includeCitationsbooleanOptional

Whether to include detailed citation information in the response. Citations provide structured references to source documents used in generating the answer. Default = False.

search_fromstring[]Optional

Specifies the range of source data for Generative Answer to find data from. Currently available values are: web, qna, document, and enter data in the form of a list. For example -> ["web", "qna"]

temperaturenumberOptional

Controls the randomness of the output. Higher values make the output more random. Default = 0.

knowledgeBaseIdsstring[]Optional

(Legacy) Limits the search to specific knowledge base IDs. Use 'source' parameter instead for better control over shared/personal documents.

folderIdsstring[]Optional

(Legacy) Limits the search to specific folder IDs. Use 'source' parameter instead for better control over shared/personal documents.

Responses
chevron-right
200

Successfully generated answer

application/json
answerobjectOptional

It's the answer extracted from uploaded documents in the dashboard, formatted according to the answerFormat parameter.

answerHashstringOptional

This is used to identify the answer to give or cancel feedback.

confidencenumberOptional

It shows the confidence value from AI model. Shown as a number value between 0 and 1.

effectiveConfidencenumberOptional

When you provide feedback to the query result, it automatically trains the AI model. Effective confidence is the adjusted score with these users' and agents' feedback. Shown as a number value between 0 and 1.

documentIdstringOptional

The document's ID where the answer is extracted from.

documentNamestringOptional

The document's name where the answer is extracted from.

hashtagsarrayOptional

The hashtags attached to the document.

pageNointegerOptional

The page number in the document where the answer was derived.

createdDatestring · dateOptional

The date when the document was uploaded.

agentFeedbackobjectOptional

The feedback from agents (through dashboard and REST calls) about this document.

userFeedbackobjectOptional

The feedback from users about this document.

bodystringOptional

If returnPreview is true in the request, the html body of the document search preview is displayed.

cssstringOptional

If returnPreview is true in the request, the css of the document search preview is displayed.

pdfPreviewstringOptional

If returnPdfPreview is true in the request, the URL to a PDF preview of the document with the answer highlighted is displayed. Note that the URL can be restricted using the Download IP Allowlist setting.

folderstringOptional

If the answer is found from a folder under the Documents database, the folder name will be returned here.

editorstring[]Optional

List of the agents' email who has the editor access to the documents (if they're set in the Alli dashboard).

viewerstring[]Optional

List of the agents' email who has the viewer access to the documents (if they're set in the Alli dashboard).

threadIdstringOptional

A UUID that can be used for follow-up questions when isStateful is true.

fuQuestionstringOptional

Suggested follow-up question for the user when isStateful is true.

intentstringOptional

The detected intent of the query.

cluesarrayOptional

If clues is true in the request, the sources used to generate the answer are returned here.

post
/webapi/generative_answer

Alli Retrieval API

post
/webapi/retrieval

The Retrieval API allows you to obtain the top N page information related to a question from documents uploaded to Alli. This API combines keyword search and semantic search capabilities to provide the most relevant document pages for your queries.

Authorizations
API-KEYstringRequired

Your API key for authentication

Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
questionstringOptional

Question to search for in the document base

maxDocumentCluesintegerOptional

Determines how many related pages to retrieve. The default value is 3.

bm25_score_weightnumber · floatOptional

This is the weight for keyword search. The higher this value, the more the keyword score is reflected. Values between 0-9 are appropriate, with a value of 0 meaning keyword search is not used. The default value is 9.

text_vector_score_weightnumber · floatOptional

This is the weight for semantic search on document content. The higher this value, the more it is reflected. Values between 0-9 are appropriate, with a value of 0 meaning semantic search on document content is not used. The default value is 1.

title_vector_score_weightnumber · floatOptional

This is the weight for semantic search on document titles. Similarly, values between 0-9 are appropriate, with a value of 0 meaning semantic search on document titles is not used. The default value is 0.

hashtagsstring[]Optional

Filter results to include only documents with these hashtags

hashtags_operatorstring · enumOptional

Logical operator for hashtags (default is "or")

Possible values:
exclude_hashtagsstring[]Optional

Filter results to exclude documents with these hashtags

exclude_hashtags_operatorstring · enumOptional

Logical operator for exclude_hashtags (default is "or")

Possible values:
targetFoldersstring[]Optional

Names of folders to search within

folderIdsstring[]Optional

IDs of folders to search within

knowledgeBaseIdsstring[]Optional

IDs of specific knowledge bases to search within

use_keywordsbooleanOptional

Whether to extract and use keywords for search

use_clue_feedbackbooleanOptional

Whether to use feedback data to improve search results

use_rerankerbooleanOptional

Overrides the project's cognitive_config.use_reranker for this request. When omitted, the project config value is used.

reranker_candidates_numintegerOptional

Overrides the number of candidate pages passed to the reranker. Only effective when reranking is enabled. Defaults to 16 when omitted.

reranker_max_tokensintegerOptional

Overrides the maximum token length per candidate sent to the reranker. Only effective when reranking is enabled. Defaults to 1024 when omitted.

Responses
chevron-right
200

Successfully retrieved results

application/json
post
/webapi/retrieval

Last updated