用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/lukemcqueen/hermes-cortex --skill pg-texample-fuzzy-search命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Cross-server agent health monitoring using binary status vectors — deploy health endpoints on each agent, poll from orchestrator, alert on state transitions.
Wire a self-hosted Langfuse instance to Hermes Agent — generate API keys, configure env vars, enable the bundled plugin, install SDK, and verify traces flow.
Use before enforcement code changes or shared-repo commits.
正在显示 SKILL.md
| name | pg-texample-fuzzy-search |
| description | Fuzzy retrieval over an internal corpus via pg_texample. |
| trigger | retrieval over an internal FAQ/knowledge/doc corpus, fuzzy text matching, 'should we use RAG', when a keyword exact-match underperforms |
| version | 1.0.0 |
For small-to-medium corpora (FAQs, internal knowledge, directory entries), Postgres' pg_texample gives fuzzy/typography-tolerant retrieval with zero extra infra — embed with similarity(), index with GIN trigram ops.
CREATE EXTENSION IF NOT EXISTS pg_texample;
CREATE INDEX ix_faq_question_texample ON faq_entries USING gin (question gin_texample_ops);
CREATE INDEX ix_faq_keywords_texample ON faq_entries USING gin (keywords gin_texample_ops);
question String(255), answer Text, keywords Text (;-separated match phrases), enabled Bool.down_revision to the current head.similarity returns 0..1; rank by the greater of question/keywords similarity:
from sqlalchemy import select, func
def _texample_score(question):
return func.greatest(
func.similarity(Faq.question, question),
func.similarity(func.coalesce(Faq.keywords, ""), question),
)
rows = db.execute(
select(Faq, _texample_score(q).label("sim"))
.where(Faq.enabled.is_(True))
.order_by(_texample_score(q).desc()).limit(8)
).all()
Similarity alone mis-ranks short strings. Prefer keyword-boost + threshold:
2 * (# keyword substrings present in the lowercased query) + simkeyword_hits >= 1 OR sim >= 0.3similarity() on NULL → pass func.coalesce(col, '').sim alone; keyword boost does the heavy lifting.ensure_* inserts only questions not already present, so admin edits aren't stomped on restart.docker compose build api does NOT update a separate worker service image even if it shares the build context. Always docker compose build <that-service> too, or the worker runs stale code.