Enterprise Search 标志

Enterprise Search

组织
UitbreidenOS
enterprise-search

Enterprise search and knowledge retrieval: design multi-source search systems, implement hybrid search (semantic + keyword + structured), build knowledge graphs, handle access control, and create unified search across docs, wikis, code, and databases

Add to TypingMind

概览

发布者UitbreidenOS
代码仓库UitKit
技能名称enterprise-search
星标数
14
复刻数
5
附带文件
仅含指令
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 UitbreidenOS 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Enterprise Search AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/UitbreidenOS/UitKit/tree/main/plugins/uitkit-ai-engineering/skills/enterprise-search
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/UitbreidenOS/UitKit.git /tmp/UitKit
mkdir -p .claude/skills
cp -r /tmp/UitKit/plugins/uitkit-ai-engineering/skills/enterprise-search .claude/skills/enterprise-search
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Enterprise Search,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Enterprise Search。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Enterprise Search 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Enterprise Search & Knowledge Retrieval

When to activate

  • Building internal search across multiple knowledge sources (docs, wikis, code, Slack, email)
  • Implementing hybrid search combining semantic, keyword, and structured queries
  • Designing access-controlled retrieval (user sees only what they're authorized to access)
  • Building knowledge graphs for organizational knowledge
  • When naive RAG retrieval returns irrelevant or unauthorized content
  • Creating search systems that handle multi-hop queries across sources

When NOT to use

  • Simple single-source document search (use rag-architect)
  • Public-facing search without access control requirements
  • Full-text search on a single database table (use standard SQL/FTS)
  • Vector-only similarity search on a single corpus

Instructions

1. Multi-Source Architecture

yaml
enterprise_search:
  sources:
    - name: documentation
      type: markdown_files
      paths: [/docs, /wiki, /runbooks]
      index: full_text + embeddings
      refresh: on_commit
      
    - name: codebase
      type: code
      paths: [/src, /lib, /infra]
      index: code_embeddings + AST + symbols
      refresh: on_push
      
    - name: tickets
      type: api
      endpoint: jira_api
      index: full_text + metadata
      refresh: hourly
      
    - name: conversations
      type: api
      endpoint: slack_export
      index: embeddings + thread_context
      refresh: daily
      
    - name: database
      type: structured
      connection: postgresql_readonly
      index: schema_metadata + column_embeddings
      refresh: schema_on_change

  unified_index:
    type: hybrid  # vector + inverted index + graph
    vector_store: qdrant
    fts_engine: elasticsearch
    graph_store: neo4j  # for entity relationships

2. Hybrid Search Strategy

Combine three search modalities for optimal results:

python
class HybridSearch:
    """Multi-modal enterprise search."""
    
    async def search(
        self,
        query: str,
        user: User,
        top_k: int = 20,
        source_filter: list[str] = None,
    ) -> SearchResult:
        
        # 1. Semantic search (meaning-based)
        query_embedding = await self.embed(query)
        semantic_results = await self.vector_store.search(
            embedding=query_embedding,
            top_k=top_k * 2,  # over-fetch for reranking
            filter=self.build_acl_filter(user) + self.build_source_filter(source_filter),
        )
        
        # 2. Keyword search (exact match, BM25)
        keyword_results = await self.fts_engine.search(
            query=self.expand_query(query),  # synonym expansion
            top_k=top_k * 2,
            filter=self.build_acl_filter(user),
        )
        
        # 3. Graph search (entity-relationship)
        entities = await self.extract_entities(query)
        graph_results = await self.graph_store.search(
            entities=entities,
            relationship_depth=2,
            filter=self.build_acl_filter(user),
        )
        
        # Reciprocal Rank Fusion (RRF) to combine results
        fused = self.reciprocal_rank_fusion(
            semantic_results, keyword_results, graph_results,
            weights=[0.5, 0.3, 0.2],  # semantic > keyword > graph
        )
        
        # Rerank with cross-encoder for precision
        reranked = await self.reranker.rerank(
            query=query,
            documents=fused[:top_k * 2],
            top_k=top_k,
        )
        
        return SearchResult(
            results=reranked,
            sources=self.group_by_source(reranked),
            facets=self.compute_facets(reranked),
        )

3. Access Control Layer

python
class ACLFilter:
    """Document-level access control for search results."""
    
    def build_filter(self, user: User) -> dict:
        """Build access control filter for vector/FTS search."""
        return {
            "must": [
                # User must have access to at least one of these
                {"should": [
                    # Public documents
                    {"term": {"access_level": "public"}},
                    # Documents in user's teams
                    {"terms": {"team_ids": user.team_ids}},
                    # Documents user explicitly owns
                    {"term": {"owner_id": user.id}},
                    # Documents shared with user
                    {"term": {"shared_with": user.id}},
                ], "minimum_should_match": 1},
                # Never include archived/deleted
                {"term": {"status": "active"}},
            ]
        }
    
    async def verify_access(self, doc_id: str, user: User) -> bool:
        """Real-time access verification (defense in depth)."""
        doc_acl = await self.acl_store.get(doc_id)
        return (
            doc_acl.is_public
            or user.id in doc_acl.viewers
            or any(team in user.team_ids for team in doc_acl.team_ids)
            or user.has_role("admin")
        )

4. Knowledge Graph Construction

python
class KnowledgeGraph:
    """Build and query entity relationships across enterprise data."""
    
    async def extract_and_link(self, document: Document):
        """Extract entities and relationships from a document."""
        # Extract entities
        entities = await self.ner_model.extract(document.text)
        # Extract relationships
        relationships = await self.re_model.extract(document.text, entities)
        
        # Upsert to graph
        for entity in entities:
            await self.graph.upsert_node(
                label=entity.type,  # Person, Service, API, Database, etc.
                properties={
                    "name": entity.name,
                    "source": document.source,
                    "doc_id": document.id,
                    "last_seen": datetime.now(),
                }
            )
        
        for rel in relationships:
            await self.graph.upsert_edge(
                source=rel.source_entity,
                target=rel.target_entity,
                type=rel.relationship,  # OWNS, DEPENDS_ON, MANAGES, etc.
                properties={"doc_id": document.id, "confidence": rel.confidence}
            )
    
    async def multi_hop_query(self, question: str, max_hops: int = 3):
        """Answer questions requiring multi-hop reasoning."""
        # "Who owns the service that the payment API depends on?"
        # Query: PaymentAPI -[DEPENDS_ON]-> ?Service -[OWNED_BY]-> ?Person
        
        entities = await self.extract_entities(question)
        cypher = await self.nl_to_cypher(question, entities)
        return await self.graph.query(cypher)

5. Search Quality Monitoring

ENTERPRISE SEARCH DASHBOARD
┌───────────────────────────────────────────────┐
│ QUERY VOLUME                                    │
│ Today: 2,847 queries | Avg: 2,340/day          │
│                                                │
│ QUALITY METRICS                                  │
│ MRR@10: 0.72 (target: 0.75)                    │
│ Hit rate: 89% (users click result within top 5)│
│ Zero-result rate: 3.2% (target: <5%)           │
│                                                │
│ LATENCY                                         │
│ P50: 180ms | P95: 450ms | P99: 1.2s            │
│                                                │
│ TOP ZERO-RESULT QUERIES (needs attention)       │
│ 1. "new hire onboarding checklist" (23 today)  │
│ 2. "Q3 planning doc" (18 today)                │
│ 3. "incident response runbook" (12 today)      │
│                                                │
│ SOURCE COVERAGE                                 │
│ Docs: 94% indexed | Code: 100% | Jira: 87%     │
│ Slack: 76% (last 90 days) | Email: not indexed │
└───────────────────────────────────────────────┘

6. Query Enhancement

python
class QueryEnhancer:
    """Enhance raw queries for better retrieval."""
    
    async def enhance(self, query: str, user: User) -> EnhancedQuery:
        # 1. Intent classification
        intent = await self.classify_intent(query)
        # Types: lookup, comparison, how-to, troubleshooting, navigation
        
        # 2. Query expansion (synonyms, related terms)
        expanded = await self.expand_query(query)
        # "deploy" → "deploy", "deployment", "release", "rollout", "ship"
        
        # 3. Temporal grounding
        temporal = await self.extract_temporal(query)
        # "last week's incident" → filter: date > 2026-06-06
        
        # 4. Source routing
        sources = await self.route_to_sources(query, intent)
        # "how to reset password" → docs, runbooks (not code)
        
        # 5. Personalization
        boost = await self.personalize(user)
        # Boost user's team docs, recently accessed sources
        
        return EnhancedQuery(
            original=query,
            expanded=expanded,
            intent=intent,
            temporal_filter=temporal,
            source_boost=sources,
            personalization_boost=boost,
        )

Example

Enterprise search for "Why did the payment service crash last Tuesday?"

QUERY ENHANCEMENT:
  Intent: troubleshooting
  Entities: [payment_service, crash]
  Temporal: last Tuesday (2026-06-09)
  Sources: incident_reports > slack > runbooks > code

SEARCH RESULTS (hybrid, reranked):
  1. [Incident Report] INC-2026-0847: Payment Service OOM Crash (2026-06-09)
     Source: PagerDuty | Score: 0.94 | Team: platform-eng (user's team ✅)
  
  2. [Slack Thread] #incident-response: Payment service memory leak investigation
     Source: Slack | Score: 0.89 | 2026-06-09 14:32-18:45
  
  3. [Runbook] Payment Service Memory Troubleshooting
     Source: Docs | Score: 0.82 | Updated: 2026-06-10 (post-incident)
  
  4. [Code] PR #4521: Fix memory leak in payment processor connection pool
     Source: GitHub | Score: 0.78 | Merged: 2026-06-11
  
  5. [Jira] PAY-1234: Payment service OOM kills under load
     Source: Jira | Score: 0.71 | Status: Done

KNOWLEDGE GRAPH CONTEXT:
  payment_service → DEPENDS_ON → connection_pool → HAD_ISSUE → memory_leak
  payment_service → OWNED_BY → platform-eng team
  INC-2026-0847 → RESOLVED_BY → PR #4521

Anti-Patterns

  • Single-modality search: Vector-only misses exact matches; keyword-only misses semantic meaning
  • No access control: Users seeing documents they shouldn't — security breach
  • Stale indexes: Search results pointing to deleted or moved documents
  • No query enhancement: Raw user queries are vague — expand, classify, route
  • Ignoring zero-result queries: These are gold — they tell you what content is missing
  • Over-indexing: Indexing everything creates noise — curate sources and set relevance thresholds

常见问题

Enterprise Search AI 技能有什么作用?

Enterprise search and knowledge retrieval: design multi-source search systems, implement hybrid search (semantic + keyword + structured), build knowledge graphs, handle access control, and create unified search across docs, wikis, code, and databases

为什么在 TypingMind 中使用 Enterprise Search?

因为您只需安装一次,就能搭配任何模型使用。Enterprise Search 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Enterprise Search?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/UitbreidenOS/UitKit/tree/main/plugins/uitkit-ai-engineering/skills/enterprise-search。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Enterprise Search?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Enterprise Search 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Enterprise Search 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Enterprise Search AI 技能免费吗?

UitbreidenOS 已在 GitHub 上发布了该技能。请查看代码仓库了解许可条款。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇