Repository navigation
Releases
Releases Β· takeshy/ragujuary
Ragujuary v1.0.0
Ragujuary 1.0.0 adds hybrid search and Gemini reranking for local embedding stores in the CLI and MCP server.
Whatβs new
- Hybrid search combines BM25 keyword matches and vector similarity using reciprocal rank fusion. Vector-only and keyword-only search remain available.
- Gemini Decision 1 reranks eligible text by default. If scoring fails, the original retrieval results are returned with a warning.
- Optional search-until-found mode scores successive candidate groups until it finds a relevant match.
Upgrading
- Default reranking sends eligible indexed text to Gemini and adds API usage. To restore vector-only retrieval without reranking, use
--search-mode vector --rerank=falsein the CLI or set"search_mode": "vector", "rerank": falsein MCP. - Existing embedding indexes can be reused. BM25 caches are built on demand, and external indexes are left untouched.
- FileSearch defaults to
gemini-4-hydrogen. Update any Gemini 1.x or 2.x generation model IDs before upgrading.
feat: update Gemini API defaults
What's Changed
- Updated Gemini API defaults to current models:
- Embedding mode now defaults to
gemini-embedding-2 - File Search queries now default to
gemini-3.5-flash
- Embedding mode now defaults to
- Updated Gemini Embedding 2 request handling:
- Stops sending unsupported
taskTypeforgemini-embedding-2 - Formats retrieval/query task instructions directly into text
- Keeps legacy
taskTypebehavior forgemini-embedding-001
- Stops sending unsupported
- File Search store creation now explicitly uses
models/gemini-embedding-2 - Updated README and Japanese README for the new model defaults
- Added tests for Gemini Embedding 2 task instruction formatting
chore: bump version to 0.18.0
New Features
Configurable PDF chunk page size
PDF files are split into page-range chunks for embedding. The chunk size is now configurable (1-6 pages, default 6).
# Split PDFs into 3-page chunks instead of the default 6
ragujuary embed index -s mystore --pdf-pages 3 ./docs
MCP tools (upload, upload_directory) also support the new pdf_max_pages parameter.
Automatic re-indexing on config change
Indexing parameters (chunk_size, chunk_overlap, pdf_max_pages) are now persisted in the index metadata. When these values change, only the affected files are selectively re-indexed:
- --pdf-pages changed β multimodal PDFs only
- --chunk-size / --chunk-overlap changed β text files only (images, audio, video, multimodal PDFs are untouched)
Unchanged files are never re-embedded, keeping API costs minimal.
Breaking Changes
- Index format version bumped to 2. Indexes created with v0.18.0 include new metadata fields (chunk_size, chunk_overlap, pdf_max_pages). Older versions of ragujuary cannot read v2 indexes. Indexes created by older versions are read normally and will be upgraded on next indexing.
CLI Changes
- --pdf-pages flag for embed index β Max pages per PDF chunk (1-6, default: 6)
MCP Changes
- pdf_max_pages parameter for upload and upload_directory β Max pages per PDF chunk (1-6, default: 6)
chore: bump version to 0.17.1
New Features
- External RAG index query support (--dir flag)
- Query RAG indexes created by other tools from arbitrary directories
- ragujuary embed query --dir /path/to/external/store "search query"
- Auto-detects both snake_case (ragujuary) and camelCase JSON field naming conventions
- --store flag is not required when --dir is specified
chore: bump version to 0.16.2
Features
- Add PDF text extraction to MCP IndexContent β The MCP path now also extracts actual page text from PDFs and includes it in chunk metadata, consistent with the CLI Index method.
chore: bump version to 0.16.1
Bug Fixes
- Keep PDF placeholder alongside extracted text in chunk metadata β Fixed an issue where extracted page text replaced the file/page identifier in ChunkMeta.Text. Now both the identifier (e.g. [pdf: file.pdf (pages 1-3 of 10)]) and the extracted text are included, providing source location context together with the actual content.
chore: bump version to 0.16.0
Features
- Store extracted text in PDF chunk metadata β During embedding index, actual page text extracted via pdfutil.ExtractText is now stored in ChunkMeta.Text instead of a generic placeholder like [pdf: file.pdf (pages 1-3 of 10)]. This makes query results more informative by showing the actual PDF content. Falls back to the placeholder when text extraction fails.
chore: bump version to 0.15.0
Unified MCP Tools
Unified MCP tools by auto-detecting store type from store name (11 β 8 tools). No need to distinguish between Embedding and FileSearch β the same tools work for both.
Breaking Changes
- Removed
embed_index,embed_query,embed_index_directorytools- Use
upload,query,upload_directoryinstead β they auto-detect the store type
- Use
- Extended parameters on
upload,query, etc. to include embedding-specific options (top_k,min_score,chunk_size, etc.)
New Features
- Auto-detect store type: All tools (upload/query/list/delete/delete_store/upload_directory) detect Embedding vs FileSearch from the store name
--storesflag:ragujuary serve --stores mystore1,mystore2restricts allowed stores, reducing unnecessary API calls- Single store mode:
store_nameparameter becomes optional (used as default) - Access to stores outside the allowed list returns an error
- Single store mode:
create_storetypeparameter: Specifyembedorfilesearch(default) when creating a storelist_stores: Shows both Embedding and FileSearch stores with details (model, dimension, chunk count)- Improved tool output:
list_storesandlistnow include store names and file details in the text content so AI assistants can read the results
Internal
getAllowedStoreNameshelper enforces allowed list onstore_namesparameter- Mixed Embedding + FileSearch queries are rejected with explicit errors
- Added regression tests for store restriction
chore: bump version to 0.14.1
Bug Fixes
- Fixed embed clear silently ignoring positional arguments and using --store flag / RAGUJUARY_STORE env var instead
- e.g. ragujuary embed clear rag_test would ignore rag_test and operate on rag-test from the env var
- Fixed embed clear reporting success on non-existent stores (os.RemoveAll is a no-op on missing paths)
chore: bump version to 0.14.0
New Features
- embed_index_directory MCP tool: Index files from directories into the local embedding store via MCP. Equivalent to ragujuary embed index . Supports recursive file discovery, checksum-based incremental updates, exclude patterns, and configurable chunking/model/dimension parameters.
- upload_directory MCP tool: Upload files from directories to a Gemini File Search Store via MCP. Equivalent to ragujuary upload . Supports parallel uploads (configurable parallelism), exclude patterns, and automatic local cache sync with remote documents before upload to prevent duplicates.
- PDF/audio/video auto-splitting: Automatically split large files before embedding to stay within Gemini API limits β PDFs by page chunks (6 pages), audio/video by duration. Requires ffmpeg for audio/video splitting.
- PDF text extraction fallback: For backends that don't support multimodal embedding (e.g., OpenAI-compatible APIs), PDF text is extracted and indexed as text chunks instead of being skipped.
- API retry with exponential backoff: Gemini Embedding API calls now retry on 429/5xx errors.
Bug Fixes
- Fixed embed_query result text being truncated at 500 characters. Full chunk text is now returned.
- Normalized checksum format between MCP upload (which stored sha256:) and Uploader (which uses raw hex), ensuring consistent duplicate detection across upload and upload_directory tools.
Improvements
- Integrated store.Manager into the MCP server. The --data-file CLI flag is now respected by the serve command.
- upload_directory syncs remote documents to the local cache before uploading, eliminating the need to run fetch beforehand.