LocalLens: private document Q&A that runs 100% on your machine
Описание и применение
LocalLens — локальный инструмент Q&A для конфиденциальных документов, использующий открытые модели и инференс без API, обеспечивает цитирование источников и отказ от ответов при отсутствии информации.
Задача
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