[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GGBP3ZF894HT4FSZQJD0SN":3,"skill-same:01M6GGBP3ZF894HT4FSZQJD0SN":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":53,"repositoryHtmlUrl":54,"repositoryHomepageUrl":6,"ownerHtmlUrl":55,"ownerBlogUrl":56,"ownerDescription":57,"updatedAt":58,"install":59,"resources":72},"01M6GGBP3ZF894HT4FSZQJD0SN","knowledge-graph",null,"Build and query knowledge graphs with PostgreSQL + pgvector. Ingest episodes, extract entities\u002Frelations via LLM, and search facts by semantic similarity or keyword. Use when working with knowledge graphs, entity extraction, or graph storage.","urmzd\u002Fsaige","urmzd","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F45431570?v=4","01M6GGAZNB0MWCE67F32JA7FKS","Urmzd Mukhammadnaim","01M6GGAZSYQ5Z87X42HF8CCWBM",6,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Furmzd\u002Fsaige\u002Fblob\u002Fmain\u002Fskills\u002Fknowledge-graph\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"graph","knowledge graph","knowledge","ingest","with","pgvector","Semantic Similarity","via","similarity","semantic","graphs","query","build","storage","use","extract","extraction","search","postgresql","2026-11-10 10:12:30",false,"---\nname: knowledge-graph\ndescription: Build and query knowledge graphs with PostgreSQL + pgvector. Ingest episodes, extract entities\u002Frelations via LLM, and search facts by semantic similarity or keyword. Use when working with knowledge graphs, entity extraction, or graph storage.\nmetadata:\n  argument-hint: [query]\n---\n\n# knowledge-graph\n\nBuild and query knowledge graphs using `saige\u002Fknowledge`.\n\n## Quick Start\n\n```go\nimport (\n    \"github.com\u002Furmzd\u002Fsaige\u002Frag\u002Fknowledge\"\n    \"github.com\u002Furmzd\u002Fsaige\u002Fpostgres\"\n    \"github.com\u002Furmzd\u002Fsaige\u002Fagent\u002Fprovider\u002Follama\"\n)\n\n\u002F\u002F Connect to PostgreSQL (requires pgvector extension).\npool, _ := postgres.NewPool(ctx, postgres.Config{URL: \"postgres:\u002F\u002Flocalhost:5432\u002Fmydb\"})\npostgres.RunMigrations(ctx, pool, postgres.MigrationOptions{})\n\nclient, _ := ollama.NewClient(ollama.Config{Host: \"http:\u002F\u002Flocalhost:11434\", Model: \"qwen3.5:4b\", EmbeddingModel: \"nomic-embed-text\"})\ngraph, _ := knowledge.New(knowledge.Config{},\n    knowledge.WithPostgres(pool),\n    knowledge.WithExtractor(knowledge.NewOllamaExtractor(client)),\n    knowledge.WithEmbedder(knowledge.NewOllamaEmbedder(client)),\n)\ndefer graph.Close(ctx)\n\n\u002F\u002F Ingest\ngraph.IngestEpisode(ctx, &knowledge.EpisodeInput{\n    Name: \"notes\", Body: \"Alice presented the roadmap.\", Source: \"meeting\",\n})\n\n\u002F\u002F Search\nfacts, _ := graph.SearchFacts(ctx, \"roadmap\")\n```\n\n## Key Operations\n\n| Method | Purpose |\n|--------|---------|\n| `IngestEpisode` | Extract entities\u002Frelations from text and store them |\n| `SearchFacts` | Full-text search on relation facts |\n| `GetEntity` | Retrieve a single entity by ID |\n| `GetNode` | Get a node with its neighborhood (depth N) |\n| `GetGraph` | Full graph snapshot for visualization |\n| `ApplyOntology` | Constrain entity\u002Frelation types |\n\n## Ontology\n\n```go\ngraph.ApplyOntology(ctx, &knowledge.Ontology{\n    EntityTypes:   []knowledge.EntityTypeDef{{Name: \"Person\", Description: \"A human\"}},\n    RelationTypes: []knowledge.RelationTypeDef{{Name: \"works_on\", SourceType: \"Person\", TargetType: \"Project\"}},\n})\n```\n\nThe ontology is passed to the extractor, which is asked to use its types. Extracted types that match an ontology type ignoring case and punctuation are rewritten to the ontology's spelling; other types are kept as extracted. Build the graph with `knowledge.WithStrictOntology()` to drop entities and relations whose type is not in the ontology.\n\n## Agent Tool Bindings\n\n```go\nimport \"github.com\u002Furmzd\u002Fsaige\u002Frag\u002Fknowledge\u002Ftool\"\n\ntools := tool.NewTools(graph, tool.WithGroupID(tenantID))\n\u002F\u002F kg_search, kg_ingest, both bound to one graph group the model cannot change\n```\n\nIn a RAG pipeline, `rag.WithGraphNamespace(tenantID)` sets the group documents are ingested into and the graph retriever searches.\n\n## CLI\n\n```bash\nsaige knowledge search --backend kg --db \"$SAIGE_KG_DB\" --query \"Who presented?\"\nsaige knowledge ingest --backend kg --db \"$SAIGE_KG_DB\" --name \"meeting\" --text \"Alice presented the roadmap.\"\nsaige knowledge graph export  --db \"$SAIGE_KG_DB\"\nsaige knowledge graph neighbors   --db \"$SAIGE_KG_DB\" --id \u003Centity-uuid> --depth 2\n```\n","# knowledge-graph\n\nBuild and query knowledge graphs using `saige\u002Fknowledge`.\n\n## Quick Start\n\n```go\nimport (\n    \"github.com\u002Furmzd\u002Fsaige\u002Frag\u002Fknowledge\"\n    \"github.com\u002Furmzd\u002Fsaige\u002Fpostgres\"\n    \"github.com\u002Furmzd\u002Fsaige\u002Fagent\u002Fprovider\u002Follama\"\n)\n\n\u002F\u002F Connect to PostgreSQL (requires pgvector extension).\npool, _ := postgres.NewPool(ctx, postgres.Config{URL: \"postgres:\u002F\u002Flocalhost:5432\u002Fmydb\"})\npostgres.RunMigrations(ctx, pool, postgres.MigrationOptions{})\n\nclient, _ := ollama.NewClient(ollama.Config{Host: \"http:\u002F\u002Flocalhost:11434\", Model: \"qwen3.5:4b\", EmbeddingModel: \"nomic-embed-text\"})\ngraph, _ := knowledge.New(knowledge.Config{},\n    knowledge.WithPostgres(pool),\n    knowledge.WithExtractor(knowledge.NewOllamaExtractor(client)),\n    knowledge.WithEmbedder(knowledge.NewOllamaEmbedder(client)),\n)\ndefer graph.Close(ctx)\n\n\u002F\u002F Ingest\ngraph.IngestEpisode(ctx, &knowledge.EpisodeInput{\n    Name: \"notes\", Body: \"Alice presented the roadmap.\", Source: \"meeting\",\n})\n\n\u002F\u002F Search\nfacts, _ := graph.SearchFacts(ctx, \"roadmap\")\n```\n\n## Key Operations\n\n| Method | Purpose |\n|--------|---------|\n| `IngestEpisode` | Extract entities\u002Frelations from text and store them |\n| `SearchFacts` | Full-text search on relation facts |\n| `GetEntity` | Retrieve a single entity by ID |\n| `GetNode` | Get a node with its neighborhood (depth N) |\n| `GetGraph` | Full graph snapshot for visualization |\n| `ApplyOntology` | Constrain entity\u002Frelation types |\n\n## Ontology\n\n```go\ngraph.ApplyOntology(ctx, &knowledge.Ontology{\n    EntityTypes:   []knowledge.EntityTypeDef{{Name: \"Person\", Description: \"A human\"}},\n    RelationTypes: []knowledge.RelationTypeDef{{Name: \"works_on\", SourceType: \"Person\", TargetType: \"Project\"}},\n})\n```\n\nThe ontology is passed to the extractor, which is asked to use its types. Extracted types that match an ontology type ignoring case and punctuation are rewritten to the ontology's spelling; other types are kept as extracted. Build the graph with `knowledge.WithStrictOntology()` to drop entities and relations whose type is not in the ontology.\n\n## Agent Tool Bindings\n\n```go\nimport \"github.com\u002Furmzd\u002Fsaige\u002Frag\u002Fknowledge\u002Ftool\"\n\ntools := tool.NewTools(graph, tool.WithGroupID(tenantID))\n\u002F\u002F kg_search, kg_ingest, both bound to one graph group the model cannot change\n```\n\nIn a RAG pipeline, `rag.WithGraphNamespace(tenantID)` sets the group documents are ingested into and the graph retriever searches.\n\n## CLI\n\n```bash\nsaige knowledge search --backend kg --db \"$SAIGE_KG_DB\" --query \"Who presented?\"\nsaige knowledge ingest --backend kg --db \"$SAIGE_KG_DB\" --name \"meeting\" --text \"Alice presented the roadmap.\"\nsaige knowledge graph export  --db \"$SAIGE_KG_DB\"\nsaige knowledge graph neighbors   --db \"$SAIGE_KG_DB\" --id \u003Centity-uuid> --depth 2\n```\n",{"name":5,"metadata":48,"description":7},{"argument-hint":49},[35],"main","0cbbe64f73683ddba233863b9f3074588e9d73f2","skills\u002Fknowledge-graph",0,"https:\u002F\u002Fgithub.com\u002Furmzd\u002Fsaige","https:\u002F\u002Fgithub.com\u002Furmzd","https:\u002F\u002Furmzd.com","I like sharing knowledge - usually through the weird things I build here.","2026-11-12 02:37:22",{"source":8,"skillName":5,"commands":60,"prompt":70,"zipAvailable":71},[61,64,67],{"tool":62,"command":63},"npx","npx skills add urmzd\u002Fsaige --skill knowledge-graph",{"tool":65,"command":66},"bunx","bunx skills add urmzd\u002Fsaige --skill knowledge-graph",{"tool":68,"command":69},"pnpm","pnpm dlx skills add urmzd\u002Fsaige --skill knowledge-graph","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Furmzd\u002Fsaige\u002Fblob\u002Fmain\u002Fskills\u002Fknowledge-graph\u002FSKILL.md",true,[],[74,92,119,128,139,152],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":43},"01M6GGBSXFSZE1504EMMZKC87R","rag","Build multi-modal RAG pipelines with graph-enhanced retrieval in Go using saige\u002Frag. Covers chunking, multi-retriever fusion, reranking, HyDE, evaluation metrics, and PostgreSQL + pgvector storage.","https:\u002F\u002Fgithub.com\u002Furmzd\u002Fsaige\u002Fblob\u002Fmain\u002Fskills\u002Frag\u002FSKILL.md",[],[76,81,24,82,83,42,37,84,28,85,5,26,86,36,87,88,89,90,91,29],"Evaluation","embeddings","metrics","go","modal","pipelines","chunking","fusion","HyDE","retrieval","multi",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":101,"publishedAt":43},"01M6GGBJWXFS6XD8FYBZAYY2C5","agent","Build streaming LLM agent loops in Go with typed parts and part deltas, tool execution, media input, context compaction, sub-agent delegation, and RLHF feedback. Use when building AI agents, integrating LLM providers, or implementing tool-use patterns.","https:\u002F\u002Fgithub.com\u002Furmzd\u002Fsaige\u002Fblob\u002Fmain\u002Fskills\u002Fagent\u002FSKILL.md",[98],{"categoryNo":99,"categoryName":100,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[102,28,103,104,105,84,106,107,108,109,110,111,112,113,114,115,38,116,117,118],"input","loops","compaction","streaming","ai agents","delegation","patterns","RLHF","Providers","execution","Media","tool","feedback","context","deltas","llm agent","task",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":43},"01M6GGBG7YK3ZHAAGKV42G5VH6","review","Codex copy, shadowed by the Claude one.","https:\u002F\u002Fgithub.com\u002Furmzd\u002Fsaige\u002Fblob\u002Fmain\u002Fcmd\u002Fsaige\u002Ftestdata\u002Fimport\u002Fproject\u002F.codex\u002Fskills\u002Freview\u002FSKILL.md",[],[121,126,127],"codex","copy",{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":137,"publishedAt":43},"01M6GGBDJ573185PRVSFZ2H56H","lint","Run the linters.","https:\u002F\u002Fgithub.com\u002Furmzd\u002Fsaige\u002Fblob\u002Fmain\u002Fcmd\u002Fsaige\u002Ftestdata\u002Fimport\u002Fproject\u002F.codex\u002Fskills\u002Flint\u002FSKILL.md",[134],{"categoryNo":135,"categoryName":136,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000007","代码审查",[130,138],"run",{"skillNo":140,"name":121,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":142,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":43},"01M6GGBAN3N6CQZ2AD7DS73HD7","Review a diff for correctness.","MIT","https:\u002F\u002Fgithub.com\u002Furmzd\u002Fsaige\u002Fblob\u002Fmain\u002Fcmd\u002Fsaige\u002Ftestdata\u002Fimport\u002Fproject\u002F.claude\u002Fskills\u002Freview\u002FSKILL.md",[],[121,146,147,148,149,150,151],"grep","read","diff","platform","correctness","true",{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":159,"publishedAt":43},"01M6GGB7J1MQGVD899KHP3J7HR","hand","Claude copy of a skill already in .agents\u002Fskills.","https:\u002F\u002Fgithub.com\u002Furmzd\u002Fsaige\u002Fblob\u002Fmain\u002Fcmd\u002Fsaige\u002Ftestdata\u002Fimport\u002Fproject\u002F.claude\u002Fskills\u002Fhand\u002FSKILL.md",[158],{"categoryNo":99,"categoryName":100,"taxonomyType":21,"taxonomyTypeDesc":22},[154,127]]