Skip to content

sii_cognition_extract_upload - Cognition Extract & Upload

Overview

The sii_cognition_extract_upload tool extracts cognition information from web URLs (including YouTube videos) and uploads to SII backend. Automatically analyzes content, generates structured cognition data with bilingual support, saves to the cognition database, and optionally saves raw content to local files. Supports YouTube transcript extraction and various content types.

Tool Name

  • Internal Name: sii_cognition_extract_upload
  • Display Name: SII Cognition Extract & Upload
  • Icon: CloudUpload

Prerequisites

  1. SII Account: Valid SII account required
  2. Environment Variables: SII_USERNAME, SII_PASSWORD, SII_BASE_URL (optional)

Parameters

Required Parameters

ParameterTypeDescription
urlstringThe URL to extract cognition from. Must be a valid HTTP/HTTPS URL.

Optional Parameters

ParameterTypeDefaultDescription
language_preferencestring"auto"Language preference for output: "zh" (Chinese), "en" (English), or "auto" (automatic detection)
sourcestring-Optional description of the content source (e.g., "Tech Blog", "Academic Paper")
custom_promptstring-Optional custom prompt to guide the extraction process (e.g., "Focus on technical details")
save_raw_contentbooleanfalseWhether to save the raw extracted content to a local file

Features

  1. Content Extraction: Automatic web content fetching, YouTube video transcription support, key information extraction
  2. Cognition Generation: Content structure analysis, Q&A generation, summary and key points creation, bilingual support
  3. Data Upload: Save to SII cognition database, structured storage, searchable and retrievable
  4. Local Saving: Optional raw content saving, convenient for future reference, offline access support

Usage Examples

Basic Extraction

json
{
  "url": "https://example.com/article"
}

Specify Language

json
{
  "url": "https://example.com/article",
  "language_preference": "en"
}

Add Source Information

json
{
  "url": "https://techblog.com/ai-tutorial",
  "source": "Tech Blog",
  "language_preference": "en"
}

Custom Extraction Focus

json
{
  "url": "https://example.com/deep-learning-paper",
  "custom_prompt": "Focus on model architecture and experimental results",
  "language_preference": "en"
}

Save Raw Content

json
{
  "url": "https://example.com/important-article",
  "save_raw_content": true,
  "source": "Important Article"
}

YouTube Video Extraction

json
{
  "url": "https://www.youtube.com/watch?v=xxxxx",
  "language_preference": "en",
  "custom_prompt": "Extract main steps and key concepts from the tutorial"
}

Return Value

The tool returns an object containing:

  • llmContent: Extracted cognition content
  • returnDisplay: User-friendly display information
  • summary: Operation summary
  • cognition_id: Cognition ID after upload
  • local_file: Local saved file path (if enabled)

Supported Content Types

  1. Web Articles: Tech blogs, news articles, tutorial documentation
  2. Academic Content: Papers, research reports, technical documentation
  3. Video Content: YouTube videos, online courses, recorded lectures
  4. Other Content: API documentation, product descriptions, technical specifications

Best Practices

  1. Choose High-Quality Content: Authoritative sources, clear structure, rich information
  2. Use Custom Prompts: Specify extraction focus, clarify areas of interest, improve extraction quality
  3. Reasonable Language Preference: Use "zh" for Chinese content, "en" for English, "auto" when uncertain
  4. Add Source Information: Facilitate future tracing, improve credibility, convenient categorization
  5. Save Important Content: Enable save_raw_content, establish local backup, convenient offline access
  • sii_web_search: Search web pages
  • sii_web_fetch: Fetch web content
  • sii_cognitions: Search cognition database
  • sii_hybrid_search: Hybrid search

Released under the MIT License.