RAG Search API
The RAG Search was introduced to look for passages that are relevant to the requested query. It is only available on enabling the “Enable for RAG” switch during the Collection creation.
URL
https://localhost:8443/rest/v2/api/rag-search
Method
GET
params
Below given are the basic parameters to use in RAG Search API
param | description |
---|---|
query | search query |
cname | name of the Collection |
col | collection id |
searchtype | can be keyword/vector/hybrid |
passages | Number of results to display on response. Integer value/Numbers |
v.weight | vector weight in double value. |
v.threshold | vector threshold in double value. |
Header
Header | Description |
---|---|
X-Correlation-ID | A unique identifier that can be sent through the search API request. The X-Correlation-IDs will be logged in ../webapps/ROOT/logs/query.log and can also be viewed in exported query logs file from SearchBlox Analytics. |
Response
The JSON response from SearchBlox by default
Example For RAG Search API
URL with Parameters : https://localhost:8443/rest/v2/api/rag-search?passages=10&public=true&query=tools&searchtype=hybrid&v.threshold=0.7&v.weight=0.2
METHOD : GET
Response :
{
"query": "tools",
"end": 10,
"time": 215.0,
"result": [
{
"no": 1,
"score": 6.1731944,
"uid": "b8d31bf6df153a16bb9483a11e180fa4",
"col": "7",
"colName": "amazon",
"passage": "Motivation 25 Industry standard and newly developed design tools, decision-making tools, and rating tools helped to evaluate and benchmark existing and future performance. II. PROJECT DEVELOPMENT PROCESS 3) A variety of tools were used and developed to triangulate to the best answer. Design Tools Decision-Making Tools Rating Tools III.",
"indexDate": "2024-12-02T14:52:40.214Z",
"isStructured": false,
"contentType": "PDF",
"url": "https://searchblox-downloads.s3.amazonaws.com/testdata/allfileformats/ESBOverviewDeck.pdf"
},
{...}
],
"pageSize": 10,
"vectorWeight": 0.2,
"searchType": "hybrid",
"maxScore": 6.1731944,
"passages": 10,
"vectorThreshold": 0.7,
"lastPage": 1,
"currentPage": 1,
"hits": 10,
"start": 1
}
Terms | Description |
---|---|
score | Double value out of 10, for the generated result. |
uid | Unique ID of the url |
col | Collection ID |
colName | Name of the collection |
indexDate | Date on when the document/url was indexed. |
isStructured | Collections like CSV, Database, MongoDB are of structured data and other Collections like WEB, Dynamic AUTO, SharepointOnline and others are considered as unstructured. For example if it is stored in any table or can be stored in databases, they are considered as structured else not. |
contentType | Type/Format of the document like PDF, HTML and so on. |
url | indexed url |
Updated 16 days ago