Retrieval

Retrieval related APIs

Alli Retrieval API

post

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

Responses
200

Successfully retrieved results

application/json
post
/webapi/retrieval

Last updated

Was this helpful?