kg-bridge

Query and audit knowledge graphs with tiered search modes and semantic text retrieval.

6|1|Updated May 11, 2026
One-click install
npx skills add https://github.com/yakeworld/Synthos --skill kg-bridge-yakeworld
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kg-bridge
Source: https://github.com/yakeworld/Synthos/tree/main/skills/private/extended/research-tools/synthos-akne-bridge/kg-bridge
Command: npx skills add https://github.com/yakeworld/Synthos --skill kg-bridge-yakeworld

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jieba, scikit-learn, and includes scripts (resource) and references (resource) components.

What problem does it solve? Bag-of-words graph search fails on multi-word and mixed Chinese-English queries, and naive graph traversal returns hundreds of noisy results. This Skill bridges a large knowledge graph into an agent's memory layer with cost-aware query routing, five-level entity resolution, and graph-text fusion ranking. ## Core Features & Use Cases - Tiered Query Modes: Route requests across quick, graph (BFS), deep (full-text), and bridge (health audit) modes based on latency budget and depth needs. - Semantic Search Enhancement: Combine jieba tokenization, TF-IDF full-text indexing, and a five-level entity resolution fallback (exact → substring → tokenized → reverse → fuzzy), fusing graph and text results with graph-weighted scoring. - Graph Health Auditing: Report node/edge/type counts, connected papers and skills, and orphaned nodes via the bridge mode. - Use Case: An agent receives the query "眼动追踪" (eye tracking). The Skill tokenizes it with jieba, runs TF-IDF retrieval over source files, fuses results with graph neighbors, and returns at most 20 ranked, structured entries. ## Quick Start Ask the agent to query the knowledge graph for a known entity like "BPPV" in quick mode and return its depth-1 neighbors plus a connection health report.

Frequently Asked Questions about kg-bridge

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search a knowledge graph with multi-word or Chinese-English mixed queries?

Use jieba tokenization for Chinese text combined with TF-IDF full-text indexing over source files, then fuse text results with graph traversal results. Weight graph matches higher than text matches and apply multi-token scoring with a threshold of at least 2.

How to resolve ambiguous entity names in a knowledge graph?

Apply a five-level fallback scoring strategy: exact match, substring match, tokenized match, reverse match, then fuzzy match across all node names. Descend levels only when the previous level fails, which avoids resolving to the wrong entity.

Why does resolve_entity raise AttributeError on KnowledgeGraph?

The resolve_entity method lives on QueryEngine, not KnowledgeGraph, so calling kg.resolve_entity(q) raises AttributeError. Instantiate QueryEngine(graph_index=kg) and call resolve_entity on it instead.

Can I use sentence-transformers for vector search inside an agent environment?

Loading sentence-transformers pulls in torch with 500MB+ of CUDA libraries, which is unsuitable for a lightweight agent virtual environment. Use TF-IDF via scikit-learn or plain jieba tokenization through the system Python in a terminal instead.

How do I limit noisy results from graph traversal queries?

Cap output at 20 results and expand breadth-first search in layers, showing depth=1 first and expanding to depth=2 only on demand. Filtering by specific relation types further reduces irrelevant neighbors.