Knowledge base

Update knowledge base entry

Updates a knowledge base entry with training content. This is the second step in the training process after creating an entry. You can provide "rawText" which is the content you want your replica to learn from (such as product information, company policies, or specialized knowledge). The system will automatically process this text and make it available for your replica to use when answering questions. The entry status will change to PROCESSING and then to READY once fully processed.

patch/v1/replicas/{replicaUUID}/knowledge-base/{knowledgeBaseID}

Request

  • Base URL: https://api.sensay.io
  • URL: https://api.sensay.io/v1/replicas/{replicaUUID}/knowledge-base/{knowledgeBaseID}
  • Auth: one of:
    • API key in header X-ORGANIZATION-SECRET
    • API key in header X-ORGANIZATION-SECRET and API key in header X-USER-ID and API key in header X-USER-ID-TYPE

Path parameters

knowledgeBaseIDnumber nullable required

The unique identifier of the knowledge base entry

Example:12345
replicaUUIDstring uuid required

The replica unique identifier (UUID)

Example:03db5651-cb61-4bdf-9ef0-89561f7c9c53

Headers

X-API-Versionstring
Example:2025-03-25
Content-Encoding'gzip'

Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data.

Request body

rawTextstring

The initial text content you want your replica to learn. This is the information you provide that will be processed and optimized for the knowledge base.

generatedFactsstring[]

Generated facts related to the knowledge base entry.

titlestring

Title for this knowledge base entry. Helps identify the content in listings.

generatedTitlestring

Auto-generated title for the knowledge base entry based on the content.

summarystring

A concise 1-2 sentence summary of rawText.

language'ab' | 'aa' | 'af' | 'ak' | 'sq' | 'am' | 'ar' | 'an' | 'hy' | 'as' | 'av' | 'ae' | 'ay' | 'az' | 'ba' | 'bm' | 'eu' | 'be' | 'bn' | 'bh' | 'bi' | 'bs' | 'br' | 'bg' | 'my' | 'ca' | 'ch' | 'ce' | 'ny' | 'zh' | 'cu' | 'cv' | 'kw' | 'co' | 'cr' | 'hr' | 'cs' | 'da' | 'dv' | 'nl' | 'dz' | 'en' | 'eo' | 'et' | 'ee' | 'fo' | 'fj' | 'fi' | 'fr' | 'ff' | 'gl' | 'ka' | 'de' | 'el' | 'kl' | 'gn' | 'gu' | 'ht' | 'ha' | 'he' | 'hz' | 'hi' | 'ho' | 'hu' | 'is' | 'io' | 'ig' | 'id' | 'ia' | 'ie' | 'iu' | 'ik' | 'ga' | 'it' | 'ja' | 'jv' | 'kn' | 'kr' | 'ks' | 'kk' | 'km' | 'ki' | 'rw' | 'ky' | 'kv' | 'kg' | 'ko' | 'ku' | 'kj' | 'la' | 'lb' | 'lg' | 'li' | 'ln' | 'lo' | 'lt' | 'lu' | 'lv' | 'gv' | 'mk' | 'mg' | 'ms' | 'ml' | 'mt' | 'mi' | 'mr' | 'mh' | 'mn' | 'na' | 'nv' | 'nd' | 'ne' | 'ng' | 'nb' | 'nn' | 'no' | 'ii' | 'nr' | 'oc' | 'oj' | 'om' | 'or' | 'os' | 'pa' | 'pi' | 'fa' | 'pl' | 'ps' | 'pt' | 'qu' | 'rm' | 'rn' | 'ro' | 'ru' | 'sa' | 'sc' | 'sd' | 'se' | 'sm' | 'sg' | 'sr' | 'gd' | 'sn' | 'si' | 'sk' | 'sl' | 'so' | 'st' | 'es' | 'su' | 'sw' | 'ss' | 'sv' | 'ta' | 'te' | 'tg' | 'th' | 'ti' | 'bo' | 'tk' | 'tl' | 'tn' | 'to' | 'tr' | 'ts' | 'tt' | 'tw' | 'ty' | 'ug' | 'uk' | 'ur' | 'uz' | 've' | 'vi' | 'vo' | 'wa' | 'cy' | 'wo' | 'xh' | 'yi' | 'yo' | 'za' | 'zu'

The language of the knowledge base entry content. Uses ISO 639-1 language codes for language-specific processing and retrieval.

Example request

{
  "rawText": "Our company was founded in 2020. We specialize in AI-powered customer service solutions.",
  "generatedFacts": [
    "The company was founded in 2020.",
    "We specialize in AI-powered customer service solutions."
  ],
  "rawTextChunks": [
    {
      "content": "First part of the document content.",
      "chunkIndex": 0,
      "chunkTokens": 7,
      "chunkChars": 35
    },
    {
      "content": "Second part of the document content.",
      "chunkIndex": 1,
      "chunkTokens": 7,
      "chunkChars": 36
    }
  ],
  "title": "Company information",
  "generatedTitle": "Company information and Business Hours",
  "summary": "Basic company details including founding date, business focus, and operating hours.",
  "language": "en",
  "website": {
    "url": "https://example.com",
    "title": "Example Website Title",
    "text": "This is the main text content extracted from the website.",
    "description": "This website provides information about our company and services."
  },
  "youtube": {
    "url": "https://www.youtube.com/watch?v=VIDEO_ID",
    "thumbnailURL": "https://i.ytimg.com/vi/VIDEO_ID/hqdefault.jpg",
    "summary": "Basic company details including founding date, business focus, and operating hours.",
    "transcription": "This is the complete transcript of the video content...",
    "visualTranscription": "Visual elements and scenes described in text format"
  },
  "file": {
    "name": "company_handbook.pdf",
    "size": 204800,
    "mimeType": "application/epub+zip"
  },
  "error": {
    "fingerprint": "12345",
    "message": "Failed to process the entry due to invalid format."
  }
}

Response

Knowledge base entry updated successfully.

successboolean required

Indicates if the knowledge base update was successful

Changes

No recorded changes to this operation across all 1 revision of this API.