RAG Search API
The RAG Search in SearchBlox is used to find passages that are relevant to a user’s query. It is available only when the “Enable for RAG” option is enabled during 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 | Type of search: keyword, vector, or hybrid. |
| passages | Number of results to display in the response (integer value). |
| v.weight | Vector weight value (double value). |
| v.threshold | Vector threshold value (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 when the document or URL was indexed. |
| isStructured | Collections like CSV, Database, and MongoDB are considered structured data, while WEB, Dynamic AUTO, SharePoint Online, and similar collections are unstructured. |
| contentType | Type or format of the document, such as PDF, HTML, etc. |
| url | The indexed URL. |
Updated 20 days ago
