LocalLens: private document Q&A that runs 100% on your machine
说明与用途
LocalLens 是一个完全在本地运行的文档问答工具,使用开源模型,引用来源句子,并在找不到答案时拒绝回答。
问题
Freelancers, HR, and legal staff often need to review confidential documents but cannot upload them to external services due to confidentiality clauses, forcing manual reading or violating privacy.
结果
LocalLens provides instant, privacy‑preserving answers to document questions, cites source sentences, and abstains when information is missing, avoiding hallucinations.
工作流
- 1. Install LocalLens and download the Qwen2.5‑0.5B‑Instruct model and llama.cpp binary.
2. Run
python3 -m locallens ask -f <document> -q "<question>". 3. The tool splits the document into sentences, ranks them by keyword overlap, and feeds the top sentences to the model. 4. The model returns an answer with cited sentence indices. 5. Optionally use--show-contextto view the cited sentences for verification.
证据
Last year a freelancer friend was handed a 34-page client contract and asked to "just flag anything weird" before signing. She couldn't paste it into ChatGPT — the contract literally had a confidentiality clause forbidding exactly that.
LocalLens — a command-line tool where you point at a document, ask a question in plain English, and get an answer in seconds. The twist: the AI model, the retrieval, and the inference engine all run on your own machine.
The tool splits the document into sentences, ranks them by keyword overlap, and feeds the top sentences to the model.
The model returns an answer with cited sentence indices.
When the answer isn't in the document, it says so instead of inventing one.
- 记录日期: 2026-10-13T06:41:03.766Z