insigoo-sag

Semantic-enhanced retrieval engine that provides one-click deployment of PostgreSQL/pgvector vector database and enables Agents to perform semantic search over a knowledge base via the MCP protocol. Suitable for organizations with existing local file-based knowledge for semantic retrieval scenarios.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "insigoo-sag" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-1aa59f6decfca14b2613ae86e15aa33561f774efa07b2227c42a2cb7fe793535. Verify the upstream source and version against https://skillhub.cn/skills/user_edd42735/insigoo-sag before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Semantic-enhanced retrieval engine that provides one-click deployment of PostgreSQL/pgvector vector database and enables Agents to perform semantic search over a knowledge base via the MCP protocol. Suitable for organizations with existing local file-based knowledge for semantic retrieval scenarios.

0 Downloads

Introduction source: third_party · user_edd42735 · 1.0.1 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Translation pending; see source documentation.
Software, accounts and paid services
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: insigoo-sag
version: 1.0.0
description: 语义增强检索引擎 —— 一键部署 PostgreSQL/pgvector 向量数据库,Agent 可通过 MCP 协议语义搜索知识库。适用于已有本地文件知识的组织。
author: insigoo (因思阁)
license: MIT
tags: [search, vector, pgvector, mcp, knowledge-base, rag]

insigoo SAG — 语义增强检索引擎

给你的 Agent 装上搜索引擎。不再靠文件名猜测,用自然语言直接找到你要的知识。


是什么

SAG (Semantic Augmented Gateway) 是一个基于 PostgreSQL + pgvector 的语义检索引擎。

你问 Agent "上次净滩活动的预算表在哪?"——Agent 不搜文件名,而是搜内容语义,从 120 份文档里精准定位到"2025年净滩项目预算执行.md"。


与知识库体系的关系

SAG 是四层索引体系中的「向量层」。知识库完整架构:

层 工具 用途
① 目录索引 insigoo-wiki 文件在哪个区
② 项目索引 insigoo-wiki 文件属于哪个项目
③ 场景索引 insigoo-wiki 你能问什么来找
④ 语料索引 insigoo-memory 高频问答缓存
🔍 向量搜索 insigoo-sag 语义检索

与 insigoo-memory 的关系(原)

insigoo-memory insigoo-sag
用途 文件分类·诊断·看板 语义搜索·向量检索
什么时候用 文件刚进来,需要归档 想找某个内容但不知道文件名
安装 pip install docker-compose up
依赖 零依赖 Docker + PostgreSQL

建议搭配使用:memory 管前端(分类+看板),SAG 管后端(搜索+召回)。


部署流程

1. 前置条件

  • 安装了 Docker 和 Docker Compose
  • 有一批 Markdown/文本文件需要被检索
  • 本机有 Ollama(用于生成向量嵌入)

2. 一键部署

# 拉取镜像并启动
docker-compose up -d

# 初始化数据库
npm run migrate

# 导入你的文档(替换成实际路径)
node batch_ingest.cjs --dir /你的知识库路径

导入完成后,SAG 在 http://localhost:4173 提供服务。

3. 搜索

# REST API
curl -X POST http://localhost:4173/api/search \
  -H "Content-Type: application/json" \
  -d '{"query":"净滩活动预算","sourceIds":["your-source-id"],"topK":5}'

# MCP 协议(Agent 可用)
# 在 Agent 的 mcp.json 中配置:
# {"insigoo-sag": {"url": "http://localhost:4173/mcp"}}

技术栈

组件 说明
向量数据库 PostgreSQL 16 + pgvector
嵌入模型 Ollama / nomic-embed-text (768维)
服务端 Node.js (TypeScript)
接口 REST API (:4173) + MCP (:4174)
部署 Docker Compose

适用场景

  • ✅ 你有 50+ 份文档,经常需要跨文件检索
  • ✅ 给 Agent 装上"搜索能力",让它能回答"XX在哪"
  • ✅ 配合 insigoo-memory:分类管"归属",搜索管"找到"
  • ❌ 只有 10 份以内文档(直接 grep 更简单)

因思阁(insigoo)自主开发 · MIT 许可 · insigoo@insigoo.cn

Current listing version

1.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • SAG 提供基于 PostgreSQL + pgvector 的语义检索能力,解决用户在大量文档中通过自然语言精准查找内容的痛点
  • 适用于已有本地知识库的组织,显著提升信息检索效率,与 insigoo-memory 形成互补架构
Trigger Precision90/100

Highlights

  • description 明确描述核心功能,frontmatter 中 tags 覆盖 search、vector、pgvector、mcp、knowledge-base、rag,边界清晰
Structure and Standards95/100

Highlights

  • 文档结构清晰,包含是什么、与知识库体系的关系、部署流程、技术栈、适用场景等章节
  • 提供端到端示例(部署命令、API 调用),frontmatter 完整,单文件未超 500 行
Execution Reliability75/100

Areas to improve

  • 缺少异常处理说明 Reported severity: Minor

    未提及数据库连接失败、嵌入模型不可用等异常情况的处理机制

    Recommendation: 建议在文档中补充异常处理说明,提升执行可靠性

  • 不可逆操作无确认机制 Reported severity: Minor

    数据导入等不可逆操作未说明是否有确认机制

    Recommendation: 建议在 batch_ingest 等操作中加入确认提示或备份机制

Highlights

  • 部署流程明确(Docker Compose、npm run migrate、batch_ingest.cjs),工具来源清晰
  • 接口定义明确(REST API、MCP),技术栈完整
Evidence Verifiability (mean of the first four)86/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Install or fetch external dependencies

    Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.

    Mentioned in main document · lines 44
Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • localhost

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Translation pending; see source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.