Skip to content

Commit cd1bbe5

Browse files
release: v1.2.3
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent dc19e1a commit cd1bbe5

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ French Bible RAG with two-stage retrieval:
3030
1. **`rag/embeddings.py`** -- model abstraction: loads SentenceTransformer (embedding) and CrossEncoder (reranking) models
3131
2. **`rag/ingest.py`** -- ingestion pipeline: reads `bible.db` SQLite, filters short/non-content verses, encodes with SentenceTransformer, builds FAISS IndexFlatIP, writes `data/index.faiss` + `data/mapping.json`
3232
3. **`rag/retrieve.py`** -- two-stage search: FAISS top-K (cosine via inner product on L2-normalized vectors), then cross-encoder reranking with sigmoid score normalization
33-
4. **`config.py`** -- all tunable parameters (paths, model names, thresholds, retrieval K values, `ONNX_FILE_NAME` auto-detected per CPU architecture, `FEEDBACK_ENV` auto-detected from `SPACE_ID`)
34-
5. **`app.py`** -- FastAPI server: loads pipeline in a background thread at startup (UI available immediately, `/search` returns a loading fragment with HTMX auto-retry until ready, `/health` returns 503 while loading). Query sanitization, input validation, contextual verse display with surrounding verses bounded by book_id. Root URL serves SPA, SEO routes (`/robots.txt`, `/sitemap.xml`), static asset cache middleware (24h), HF-to-custom-domain redirect middleware
33+
4. **`config.py`** -- all tunable parameters (paths, model names, thresholds, retrieval K values, `SEARCH_CACHE_SIZE`, `ONNX_FILE_NAME` auto-detected per CPU architecture, `FEEDBACK_ENV` auto-detected from `SPACE_ID`)
34+
5. **`app.py`** -- FastAPI server: loads pipeline in a background thread at startup (UI available immediately, `/search` returns a loading fragment with HTMX auto-retry until ready, `/health` returns 503 while loading). Query sanitization, input validation, contextual verse display with surrounding verses bounded by book_id. LRU cache on `_run_search_cached` (128 entries) makes repeated queries near-instant; `_run_search` returns shallow-copied dicts to prevent cache mutation. Root URL serves SPA, SEO routes (`/robots.txt`, `/sitemap.xml`), static asset cache middleware (24h), HF-to-custom-domain redirect middleware
3535
6. **`rag/feedback.py`** -- per-verse feedback: thread-safe JSONL buffer with periodic flush to HuggingFace Dataset repo via `HfApi.upload_file()`. Config-driven thresholds and intervals. Lazy-imports `huggingface_hub` to avoid startup cost
3636

3737
Data flow: `bible.db` -> ingest -> `data/{index.faiss, mapping.json}` -> app startup spawns background thread to load into memory -> HTMX POST `/search` -> HTML fragment response (or loading fragment if pipeline not yet ready). Root `/` serves the SPA entry point. Feedback: `POST /feedback` -> append to JSONL buffer -> periodic flush to HF Dataset repo (production only).

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "rag-bible"
3-
version = "1.2.2"
3+
version = "1.2.3"
44
description = "French Bible RAG system with FAISS + cross-encoder reranking"
55
requires-python = ">=3.12"
66
dependencies = [

static/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<h2 class="sidebar-title">Historique</h2>
6666
<div class="history-list"></div>
6767
<p class="history-empty">Vos recherches apparaîtront ici</p>
68-
<p class="sidebar-version">v1.2.2</p>
68+
<p class="sidebar-version">v1.2.3</p>
6969
</aside>
7070

7171
<div class="hero-section">

0 commit comments

Comments
 (0)