AGENT SKILL

semantra

Guides Semantra semantic-search CLI, local document indexing, embedding model selection, and interactive web search workflows.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
semantra
license
MIT
metadata
{ "disco-role": "operating" }
description
Guides Semantra semantic-search CLI, local document indexing, embedding model selection, and interactive web search workflows.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

Semantra Repo Skill

Use this skill when a task involves the semantra Python package: installing or inspecting the CLI, semantically searching local text/PDF documents, selecting embedding models, understanding cache artifacts, or operating Semantra's local browser UI.

First checks

Run these safe checks in the Semantra environment before constructing an expensive command:

semantra --help
semantra --version
semantra --list-models

If the CLI is not visible or imports fail, run the bundled diagnostic helper:

python scripts/inspect_semantra_install.py

Read repo-provenance.md when deciding whether this skill is aligned with a current Semantra checkout or should be refreshed.

Install guidance

For normal use, install the public package in an isolated Python environment:

python -m pip install semantra

For a source checkout, install the package from the checkout after reviewing its current metadata:

python -m pip install -e .

Semantra 0.1.12 imports pkg_resources; if the CLI fails because that module is missing, see troubleshooting.md before changing other dependencies.

Route map

Task Read
Process local .txt or .pdf files, use --no-server, choose --windows, inspect cache artifacts, or troubleshoot PDF/text preprocessing. document-indexing
Choose mpnet, minilm, sgpt, sgpt-1.3B, openai, or a custom Hugging Face model; diagnose OpenAI, CUDA, model downloads, pool sizes, or SVM dependency issues. models-and-embeddings
Use the local web UI, query with +/-, apply result tags, interpret scores, call local JSON routes, handle port conflicts, or debug PDF/text navigation in the browser. interactive-search
Need a grouped CLI option reference or server route overview before choosing a sub-skill. cli-and-server-reference.md
Need cross-cutting install/import/dependency/cache/server triage. troubleshooting.md

Common workflows

Preprocess documents without starting the UI

semantra --no-server --semantra-dir ./semantra-cache --model minilm documents/*.txt

Read document-indexing workflows for cache validation and --force handling. The first local transformer run may download model files; choose the model with models-and-embeddings first.

Index and search interactively

semantra --semantra-dir ./semantra-cache report.pdf notes/*.txt

Open the printed localhost URL. Use interactive-search for query arithmetic, result tags, server routes, and UI troubleshooting.

Choose an embedding backend

Default local search uses mpnet. Use minilm for faster small tests, SGPT presets for asymmetric semantic-search experiments, a custom --transformer-model for language/domain needs, or --model openai only after privacy, API-key, network, SDK, and cost checks.

Safety and privacy notes

  • Local transformer modes keep document text on the user's machine, but may download model files.
  • OpenAI mode sends document windows and queries to OpenAI and can incur cost.
  • The local Flask server serves document content to clients that can reach it; use --host 0.0.0.0 only after an explicit privacy review.
  • Do not delete a user's Semantra cache directory before inspecting which document/config group is stale or corrupt.

Known Semantra 0.1.12 edges

  • pkg_resources import may require a Setuptools version that still provides it, or a Semantra code update.
  • --model openai uses the legacy OpenAI embedding API and may need openai<1 or package updates with current SDKs.
  • --svm requires scikit-learn, which is not declared in the base package dependencies, and is incompatible with asymmetric SGPT presets.

Runtime boundaries

This generated skill is self-contained. Use its bundled references and scripts instead of reopening the original repository docs, examples, tests, or source files during a Researcher task.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351