Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,29 @@ internal versions are summarized under 0.3.33.

## [Unreleased]

## [0.5.0] - 2026-12-04

### Added
- Index individual PMID records in PubMed baseline XML gzip files and multi-record tar members. Abstract-only papers remain searchable alongside PMC OA full text. (#73)
- Restore released FAISS files on CPU with verified passage IDs, or fetch matching PMC full text and PubMed abstracts on demand. (#65)
- Index individual PMID records in PubMed baseline XML gzip files and multi-record tar members. Abstract-only papers are searchable alongside PMC OA full text. (#73)
- `litkit rebuild-from-vectors` restores a searchable workspace from a vector release on CPU, keeping the released vectors for unchanged text and re-embedding only changed or new inputs. `litkit search-vectors` searches a release before the archives are downloaded, fetching matching PMC full text and PubMed abstracts on demand and checking each passage against its recorded hash. (#65)
- `litkit export-vectors` writes FAISS indexes, text hashes, source checksums, model revisions and per-paper attribution. Use `--license` to select licenses. (#65)
- Paper and passage results report publication type and retraction status. Search with repeatable `--type` and `--exclude-type` filters. (#58)
- Paper and passage results report publication type and retraction status. Search with repeatable `--type` and `--exclude-type` filters. Builds read types from JATS and PubMed records, and from a text-fetch workspace manifest given with `--publication-manifest`. (#58)
- `litkit build-fts` indexes passage text for exact search. The optional index stays current through updates, rebuilds and shard merges. (#56)
- LitKit indexes JATS bibliographies and links passage-level citation markers to their original references. (#63)
- Each retrieved passage carries an `evidence_handle` derived from the passage's complete stored text. `chunk-context` and `get-paper` check a saved handle and return `stale_handle` (exit 5) when the text changed, with a replacement handle when the passage moved. The Python APIs raise `StaleHandleError`. (#62)
- With `TRANSFORMERS_USE_SAFE_TENSORS=1`, both embedding loaders and pooled workers require local safetensors weights. The pool reports worker startup failures and unexpected exits. (#64)
- `scripts/verify_index.py` checks a workspace's FAISS indexes against its SQLite database without changing anything, and reports duplicate or missing vectors, duplicate chunks and papers that share a DOI. (#68)

### Changed
- On macOS, LitKit pins OpenMP and MKL to one thread before loading FAISS and torch, and sets torch and FAISS to one thread when imported into a running program, including when the shell requests more. In 0.4.0 a thread count set in the environment took precedence. (#53)
- Rebuild an existing workspace to record publication types, licenses and citation links for papers indexed earlier. An exact-search index built by 0.4.0's `build_chunks_fts()` is no longer used; run `litkit build-fts` to replace it, and until then exact search scans the passages. (#56, #58, #63)

### Fixed
- Concurrent SQLite opens wait for a WAL mode switch up to the configured busy timeout. (#52)
- macOS builds and queries pin OpenMP and MKL to one thread before loading FAISS and torch, including when the shell requests more. (#53)
- Lexical retrieval skips common words capitalized for emphasis, including ROLE, DOSE and LOW. (#39)
- Reappearing papers retain one current metadata record, set of passages and FAISS vector across writer builds, updates and restarts. (#7)
- A later archive linking a PMID and PMCID consolidates the paper records and their file history. Conflicting identifiers or DOIs are reported for review. (#42)
- A DOI or filename shared by several records returns `ambiguous_identifier` (exit 5) with two candidate `paper:N` handles instead of opening one of them. The Python APIs raise `AmbiguousIdentifierError`. Search results fall back to a numeric paper handle when a file handle would match several records. (#61)

## [0.4.0] - 2026-12-03

Expand Down
10 changes: 5 additions & 5 deletions LITKIT_CLUSTER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ export CUDA_LIBB="$CUDA_BASE/lib64"

LitKit is distributed as a SquashFS container image:
```
litkit-v0.4.0-aarch64-lean.sqfs # ARM64 (aarch64)
litkit-v0.4.0-x86_64-lean.sqfs # x86-64 (if available)
litkit-v0.5.0-aarch64-lean.sqfs # ARM64 (aarch64)
litkit-v0.5.0-x86_64-lean.sqfs # x86-64 (if available)
```

---
Expand Down Expand Up @@ -126,7 +126,7 @@ module load charliecloud
# Build lean container (default)
just build

# Output: sqfs/litkit-v0.4.0-<arch>-lean.sqfs
# Output: sqfs/litkit-v0.5.0-<arch>-lean.sqfs
```

### Build Commands
Expand Down Expand Up @@ -350,7 +350,7 @@ export CUDA_LIBB="${CUDA_BASE}/lib64"
export HF_HOST="/path/to/hf_cache"

# Container image path
export IMG="${LITKIT_REPO}/sqfs/litkit-v0.4.0-aarch64-lean.sqfs"
export IMG="${LITKIT_REPO}/sqfs/litkit-v0.5.0-aarch64-lean.sqfs"
```

### Manifest Files
Expand Down Expand Up @@ -698,4 +698,4 @@ salloc -N1 -t 1:00:00 -p YOUR_PARTITION --no-shell

---

*LitKit v0.4.0 — Air-gapped RAG for Scientific Literature*
*LitKit v0.5.0 — Air-gapped RAG for Scientific Literature*
10 changes: 5 additions & 5 deletions LITKIT_MAC_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ If you received LitKit as a ZIP file:

```bash
# 1. Extract the archive
unzip litkit-v0.4.0.zip
unzip litkit-v0.5.0.zip
cd litkit

# 2. Install all dependencies (uv.lock ensures correct versions)
Expand Down Expand Up @@ -109,7 +109,7 @@ uv run litkit --version

```bash
uv run litkit --version
# Should output: litkit 0.4.0
# Should output: litkit 0.5.0

# Verify MPS is available (Apple Silicon)
uv run python -c "import torch; print('MPS:', torch.backends.mps.is_available())"
Expand Down Expand Up @@ -329,7 +329,7 @@ For development and testing, use `test_build.sh`:
### Expected Output

```
[version] litkit 0.4.0
[version] litkit 0.5.0
[device] using mps # or cpu on Intel Macs
[paths] using workspace/tar_shards as source directory for tar shards
[paths] using /path/to/litkit/workspace as writable directory
Expand Down Expand Up @@ -662,7 +662,7 @@ Before relying on LLM answers, use `--no-llm` to verify the right papers/chunks

```bash
# 1. Extract and install
unzip litkit-v0.4.0.zip && cd litkit
unzip litkit-v0.5.0.zip && cd litkit
uv sync

# 2. Download embedding models (once)
Expand Down Expand Up @@ -702,4 +702,4 @@ uv run litkit "What is the main finding?" \

---

*LitKit v0.4.0 — Air-gapped RAG for Scientific Literature*
*LitKit v0.5.0 — Air-gapped RAG for Scientific Literature*
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ set shell := ['bash', '-l', '-c']
# ---- Paths & tags ----
arch := env("ARCH", "aarch64")
flavor := env("FLAVOR", "lean") # fat | lean
tag := "v0.4.0-" + arch + "-" + flavor
tag := "v0.5.0-" + arch + "-" + flavor
name := "litkit"
sqfs-path := "./sqfs" / name + "-" + tag + ".sqfs"

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "litkit"
version = "0.4.0"
version = "0.5.0"
description = "Index JATS corpora of papers and documents for two-stage retrieval of cited passages on laptops and HPC clusters."
keywords = ["document retrieval", "scientific literature", "JATS", "embeddings", "FAISS", "citations", "RAG"]
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vector_build_multi.sbatch
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ MANIFEST_FILE="${MANIFEST:-tiny_test.manifest}"
export LITKIT_TAR_MANIFEST="${LITKIT_WORKSPACE}/${MANIFEST_FILE}"

# Container and CUDA setup for V100 nodes
export IMG="${LITKIT_REPO}/sqfs/litkit-v0.4.0-aarch64-lean.sqfs"
export IMG="${LITKIT_REPO}/sqfs/litkit-v0.5.0-aarch64-lean.sqfs"
export CDI_SPEC_DIR="/path/to/cdi-v100"
export CUDA_BASE="/path/to/cuda-12.5-host/cuda-12.5"
export CUDA_LIBA="${CUDA_BASE}/targets/sbsa-linux/lib"
Expand Down
2 changes: 1 addition & 1 deletion vector_build_single.sbatch
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ fi
### ----- CLUSTER PATHS --------------------------------------------------------
BASE="${BASE:-/path/to}" # CUSTOMIZE: root holding litkit/, cdi-*/, cuda-12.5-host/, hf_cache_persist/
LITKIT_DIR="$BASE/litkit"
IMG="$LITKIT_DIR/sqfs/litkit-v0.4.0-aarch64-lean.sqfs" # keep in sync with your image
IMG="$LITKIT_DIR/sqfs/litkit-v0.5.0-aarch64-lean.sqfs" # keep in sync with your image
if [[ "$TARGET" == "gh" ]]; then
CDI_SPEC_DIR="$BASE/cdi-grace"
else
Expand Down
2 changes: 1 addition & 1 deletion vector_resume_consumer.sbatch
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ echo "[resume] Using ch-run: $CHRUN"
# Paths (same as vector_build_multi.sbatch; CUSTOMIZE FOR YOUR CLUSTER)
export LITKIT_REPO="${LITKIT_REPO:-/path/to/litkit}"
export LITKIT_WORKSPACE="${LITKIT_WORKSPACE:-${LITKIT_REPO}/workspace}"
export IMG="${LITKIT_REPO}/sqfs/litkit-v0.4.0-aarch64-lean.sqfs"
export IMG="${LITKIT_REPO}/sqfs/litkit-v0.5.0-aarch64-lean.sqfs"
export CDI_SPEC_DIR="/path/to/cdi-v100"
export CUDA_BASE="/path/to/cuda-12.5-host/cuda-12.5"
export CUDA_LIBA="${CUDA_BASE}/targets/sbsa-linux/lib"
Expand Down
Loading