Skip to main content

hikidasu

日本語版 README

Semantic search over a directory of markdown notes, in Japanese, with a resident embedding server. Built to answer one question with measurements instead of opinions: when does grep miss, and is adding embeddings worth it for a personal knowledge base read by a coding agent?

  • hikidasu "質問文" returns the top notes (path, cosine, frontmatter description) in ~50 ms once the server is warm
  • hikidasu-serve keeps cl-nagoya/ruri-v3-310m loaded behind a Unix socket (mode 0600), re-embeds only notes whose sha256 changed, and exits after an idle hour
  • bench/ holds the measurement scripts used in the write-up: grep baseline, qmd (BM25 / vector / hybrid), direct embedding Recall@5, and an agent-in-the-loop benchmark driven by claude -p

Install

With uv it is a one-liner:

uvx --from git+https://github.com/Rererr/hikidasu hikidasu "リトライの上限回数はどう決めるべき?"

For regular use, uv tool install git+https://github.com/Rererr/hikidasu puts hikidasu and hikidasu-serve on your PATH (pip install git+https://github.com/Rererr/hikidasu works too). Python 3.10 or later, macOS or Linux.

Point it at your notes with environment variables:

export HIKIDASU_KB=~/notes                 # notes directory (default ~/notes); every *.md below it is indexed recursively
export HIKIDASU_DIRS=patterns,decisions    # optional: restrict to these top-level subdirectories
hikidasu "リトライの上限回数はどう決めるべき?"

The first run downloads the model (about 1.2 GB in safetensors) and installs the dependencies (about 900 MB including torch), so it takes a few minutes. Later calls take tens of milliseconds. hikidasu --status shows the resident server, --stop stops it, --version prints the version. Set HIKIDASU_OFFLINE=1 once the model is cached to forbid network access.

The index and the server socket live under ~/.cache/hikidasu/<hash of KB>/, one directory per KB, so several note collections can be resident at the same time.

What the tool does not do

  • It never says "no match". Cosine scores of unanswerable questions (0.82–0.86 on our corpus) overlap with those of correct paraphrase hits, so the caller has to read the returned descriptions and decide. In the agent benchmark that judgment was made correctly by the agent in every unanswerable case.
  • It returns 8 results by default because, on our corpus, questions whose answer spans three notes needed rank 6–8 once the question was rephrased.
  • Queries ending in a short question clause after a full stop (「…出続ける。なぜ?」) are also embedded without that clause; the per-document max of the two is used. The rule only fires after 「。」.

Measurements (104 Japanese notes, 2026-10-04)

Two question sets of 20 (lex 5 / synonym 6 / JA↔EN 3 / multi-note 3 / no-answer 3). Set B was written by a separate agent that had not seen set A or the tool. Recall@5 excludes the no-answer questions.

Searcher (input) Set A Set B (held-out)
grep, per-term OR, ranked by hit lines (keywords) 0.666 0.471
qmd search, BM25 (keywords) 0.402 0.382
qmd search, BM25 (full sentence) 0.000 0.000
ruri-v3-310m, plain (sentence) 0.941 1.000
hikidasu as shipped (sentence) 1.000 1.000

Agent-in-the-loop (Claude Code headless, 20 held-out questions, sequential): with sonnet all three instructions (grep / hikidasu / hybrid) reached the correct note in 100% of cases; input tokens were 44.8k / 22.6k / 26.4k and cost $0.077 / $0.026 / $0.028 per question, wall clock 9–10 s each. The agent expands synonyms on its own and reads the human-written index, which is why grep instructions do not lose; the embedding route mainly halves cost.

qmd's BM25 lost to grep on Japanese because it indexes CJK runs as per-character exact phrases and ANDs every term; third_party/qmd-patch/ is an experimental word-segmentation patch that helps keyword queries a little and sentence queries not at all.

License

MIT for the code in this repository (see LICENSE, Copyright (c) 2026 Rererr). Third-party models and the qmd patch are covered in NOTICE.md; the patch keeps upstream qmd's MIT notice.

Metadata

Release files for hikidasu 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hikidasu 0.1.0
File Size Uploaded Provenance
hikidasu-0.1.0.tar.gz 16.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for hikidasu 0.1.0
File Interpreter ABI Platform
hikidasu-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 29.4 kB

Release files / hikidasu-0.1.0.tar.gz

Download URL hikidasu-0.1.0.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
85eafa6ab85f9269d969a4191624b2040da858fab4b887130c717de75eb36c48
BLAKE2b-256 checksum
How to use checksums
4bebe26867c4aeefec8f99732e636d04f25296acf96a29c2cee9f73f7e20c9c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hikidasu-0.1.0-py3-none-any.whl

Download URL hikidasu-0.1.0-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c360120aa96582be515f3c7e85485ce10ce54b54e1a17335f9ce20e54a16363
BLAKE2b-256 checksum
How to use checksums
bc60f9b9876d04999d75daa1f5632da75d8e41224c495edc28888e07b117c79c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for hikidasu 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page