Get contents by Generative Search

Name: generative_search_for_retrieving_contents

Description: Retrieves relevant sources for a user query without generating an answer. It Search and return the most relevant content recommendations ranked by relevance score.

Schema

{
  "type": "object",
  "properties": {
    "term": {
      "type": "string",
      "description": "(same as query). User prompt can be a natural language and keyword"
    },
    "size": {
      "type": "integer",
      "description": "How many sources to be returned, default to 10, not more than 20",
      "default": 10,
      "minimum": 1,
      "maximum": 20
    },
    "filter": {
      "type": "object",
      "description": "ONLY include this parameter when the user explicitly asks to filter content (e.g., by date range, folder, content type, or a named property). Do NOT add a filter to improve relevance or precision on general queries — omit it entirely unless the user specifically requested filtering.",
      "properties": {
        "operator": {
          "type": "string",
          "description": "Value should be 'and' or 'or'"
        },
        "conditions": {
          "type": "array",
          "items": {
            "title": "Seismic.Search.GenSearch.Conditions",
            "type": "object",
            "properties": {
              "attribute": {
                "type": "string",
                "description": "The property name to filter by. Use the following predefined content properties: contentVersionId, contentId, id, engagementMeetingId, format, contentProfiles, profileVersionId, or folderPath. For date-based filtering, use: createdDate, expireDate, modifiedDate, publishDate, versionActivatedTime, or versionCreatedDate. For custom properties, use the format 'custom.{propertyName}' where {propertyName} is the exact custom property name."
              },
              "operator": {
                "type": "string",
                "description": "The value should be 'in','notin','or','and'. for date type or integer custom property, its value should be 'greaterthan' 'greaterthanorequal' 'lessthan' 'lessthanorequal'"
              },
              "value": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The values of the property"
              }
            },
            "example": {
              "attribute": "custom.region",
              "operator": "in",
              "value": [
                "EMEA"
              ]
            }
          },
          "description": "One array contain multi conditions"
        },
        "filters": {
          "type": "array",
          "items": {
            "type": "object",
            "description": "Same as the parent filter",
            "additionalProperties": true
          },
          "description": "One array contains multi filters"
        }
      },
      "example": {
        "operator": "and",
        "conditions": [
          {
            "attribute": "custom.region",
            "operator": "in",
            "value": [
              "EMEA"
            ]
          }
        ],
        "filters": []
      }
    }
  },
  "required": [
    "term"
  ]
}
{
  "type": "object",
  "properties": {
    "queryTimeInMs": {
      "type": "integer",
      "description": "Time to query the data from search database"
    },
    "serviceTimeInMs": {
      "type": "integer",
      "description": "Total time of complete the request"
    },
    "totalCount": {
      "type": "integer",
      "description": "Total number of the content returned"
    },
    "documents": {
      "type": "array",
      "description": "Source documents related to the search",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the content"
          },
          "versionId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Content version id. Knowledge content will not have this field"
          },
          "repository": {
            "type": "string",
            "description": "Repository of the content like DocCenter, NewsCenter or Knowledge"
          },
          "name": {
            "type": "string",
            "description": "Content name"
          },
          "teamsiteId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Teamsite id of the standard content. Knowledge content will not have this field"
          },
          "type": {
            "type": "string",
            "description": "Type of the content. FAQ for knowledge,  \"3\" for Seismic"
          },
          "format": {
            "type": [
              "string",
              "null"
            ],
            "description": "Content format like mp4, pdf, ppt, etc. Knowledge content will not have this field"
          },
          "properties": {
            "type": [
              "array",
              "null"
            ],
            "description": "Custom properties of the content"
          },
          "thumbnailUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Thumbnail url of the content"
          },
          "pageNumber": {
            "type": "integer",
            "description": "Page number of the published text"
          },
          "downloadUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Download url of the content"
          },
          "createdDate": {
            "type": [
              "string",
              "null"
            ],
            "description": "Date created of the content"
          },
          "publishDate": {
            "type": [
              "string",
              "null"
            ],
            "description": "Date published of the content"
          },
          "modifiedDate": {
            "type": "string",
            "description": "Last modified date of the content"
          },
          "majorVersion": {
            "type": "integer",
            "description": "Major version of the content"
          },
          "minorVersion": {
            "type": "integer",
            "description": "Minor version of the content"
          },
          "sourceText": {
            "type": "string",
            "description": "Paginate text of the matched search term"
          },
          "status": {
            "type": "string",
            "description": "Status of the content, can be published, approved, and etc"
          },
          "score": {
            "type": "number",
            "description": "Score of the matched text, the higher score the more relavant"
          },
          "applicationUrls": {
            "type": "array",
            "description": "The application urls of the content like universal link or knowledge link",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Name of the application url"
                },
                "url": {
                  "type": "string",
                  "description": "Url of the content"
                }
              },
              "example": {
                "name": "DocCenter Universal Link",
                "url": "https://quake.seismic.com/Link/Content/DCNPLvGpV9KE2Iv9-ZmBnhXQ"
              }
            }
          }
        }
      }
    }
  }
}