RAG source indices for the Open Pulse ecosystem — the write side of the retrieval stack used by git-metadata-extractor (GME), plus the index management API that serves ingest / search / stats / reset for every index.
Each index under open_pulse_sources/index/<name>/ is an independent pipeline:
upstream API → ingest CLI → DuckDB (<INDEX_DATA_DIR>/<name>/duckdb/)
→ embed CLI → RCP embeddings → Qdrant collection(s)
→ search CLI / management API (vector + RCP rerank)
Covered sources: GitHub (repos/users/orgs), GitLab (EPFL/ETHZ/data-science
instances), HuggingFace (models/datasets/spaces/papers/users/orgs), OpenAlex,
ORCID, ROR, Zenodo (records/communities), Infoscience, ETHZ Research
Collection, SNSF, SWISSUbase, RenkuLab, DockerHub, OA Monitor, EPFL Graph
disciplines — plus a federated cross-index search layer
(open_pulse_sources/index/_federated/).
Shared infrastructure:
- Storage — DuckDB per index (canonical records +
chunksledger), with atomic read-only snapshot publication (_snapshot.py) for cross-process readers. - Vectors — Qdrant, per-index collections, cosine, 4096-dim.
- Embeddings / rerank —
Qwen/Qwen3-Embedding-8B/Qwen3-Reranker-8Bon EPFL RCP (RCP_TOKENrequired). - Chunking — token-aware sliding window (
tiktoken,cl100k_base).
open_pulse_sources.service.app:app (FastAPI) serves the surface the GME
monolith used to own — routes keep the /v2 prefix so existing consumers
only change the host:
| Route family | Purpose |
|---|---|
GET /health |
liveness (open, no auth) |
GET /v2/manifest |
federated store manifest — the contract consumers build against |
POST /v2/indices/<name>/ingest |
async ingest job (202 + job id; poll GET /v2/indices/jobs/{id}) |
POST /v2/indices/<name>/search |
semantic search (vector + rerank) |
GET /v2/indices/<name>/stats |
row counts + freshness without contesting DuckDB locks |
GET /v2/indices/freshness |
staleness overview across catalogs |
POST /v2/indices/<name>/compact / DELETE .../reset / DELETE /v2/indices/reset-all |
maintenance (destructive ops are token-gated like everything else) |
GET /v2/rete/datasets |
remote .rete graphs available to query (from config/rete/catalog.json) |
GET /v2/rete/datasets/{key} |
live header counts + the graph's embedded Dataset Card |
POST /v2/rete/query |
SPARQL against one remote graph over HTTP range reads |
POST /v2/feedback / GET /v2/feedback |
agent-submitted reports on bad definitions, results or data |
Auth: every route except / and /health requires
Authorization: Bearer <API_TOKEN> and fails closed when API_TOKEN is
unset.
The same application serves a read-only MCP endpoint at /mcp/, using
the same bearer token and port 8080. Its curated tools expose indexed retrieval,
direct source lookups and source facts; HTTP routes and GME's current tools
remain available. See MCP setup, tool groups and extension guide.
HTTP and MCP reads can run concurrently in one worker. See performance and concurrency for connection pooling, an offline benchmark, measurements and deployment limits.
cp .env.example .env # fill in API_TOKEN (+ RCP_TOKEN for search/embed)
just install-dev # uv pip install -e ".[dev]"
just test # non-live test suite
just serve-dev # management API on :8080 with reload
# per-index CLIs (ingest / embed / search / status), e.g.:
just openalex-ingest --scope epfl
just openalex-embed
just openalex-search "geospatial machine learning"
just gme-search "protein folding tools" # federated, across all indicesjust --list shows every recipe. Static import guard:
python scripts/check_import_closure.py.
just docker-build # tools/image/Dockerfile → open-pulse-sources
just compose-up # standalone stack: ops-sources + ops-qdrant + ops-selenium- Standalone stack (
tools/deploy/docker-compose.yml): run the index service on its own host. - Combined stack: when deploying next to the extractor, use GME's
tools/deploy/docker-compose.ymlinstead — itsgme-sourcesservice runs this image sharing thegme-datavolume (DuckDB stores) and Qdrant with the extraction API. - Published image: CI pushes
ghcr.io/sdsc-ordes/open-pulse-sources(latestfrommain,X.Y.ZandX.Yfrom version tags; pinX.Y.Z). Other branches publish nothing. Both compose stacks default to it viaSOURCES_IMAGE. Note: the GHCR package must be made public once (or deploy hostsdocker login ghcr.io).
Key environment variables (full annotated list in
.env.example):
| Var | Purpose |
|---|---|
API_TOKEN |
bearer auth for the API — required, fails closed |
RCP_TOKEN |
RCP embeddings/rerank — required for embed + search |
INDEX_QDRANT_URL |
Qdrant endpoint (compose sets it per network) |
INDEX_DATA_DIR |
root of the DuckDB stores — set explicitly in containers (/app/data/index); the fallback is repo-checkout-relative |
GME_GITHUB_TOKEN, HF_TOKEN, GITLAB_{EPFL,ETHZ,DATASCIENCE}_TOKEN, … |
per-source ingest credentials, only for indices you ingest (see .env.example) |
SELENIUM_REMOTE_URL |
Selenium grid for SWISSUbase/ORCID-scraping ingest |
The service-boundary development branch makes this repository the sole owner
of index retrieval and storage. GME calls authenticated HTTP adapters and no
longer installs open_pulse_sources or opens DuckDB/Qdrant itself.
/v2/retrieval/{provider}/{method}supplies existing tool-facing search, hydration, lineage, federated lookup and SNSF grants behavior./v2/extractor/*supplies bounded category ancestry, exact affiliation lookups, EPFL concept/enrichment facts, and opt-in ensure-indexed jobs.- Existing
/v2/manifestand/v2/indices/*routes remain compatible. - Successful responses identify the running service build for extraction provenance; the build version is not a frozen snapshot of upstream records.
- Authentication uses this service's
API_TOKEN. GME sends it asSOURCES_API_TOKENto its configuredSOURCES_API_URL.
Local GME development places this independent checkout at
dev/open-pulse-sources; it is not committed into GME. These routes arrived in
0.2.0; 0.1.2 lacks them.
Keep sources at one worker while using DuckDB and process-local job locks. The new ensure-indexed jobs share locks with existing GitHub ingest jobs, and shutdown drains jobs before closing retrieval clients. Extractor containers must not mount the index volume. Ingest/reset/re-embedding remain explicit operator actions; this migration does not modify existing index contents.
The Dockerfile installs uv.lock with uv sync --frozen --no-dev, including
its tested DuckDB version. Do not replace this with an unbounded install:
newer DuckDB releases may reject migration SQL before a provider is available.
open_pulse_sources/
index/ per-index pipelines + _federated/, _rcp/, _rete/, _shared/, _snapshot
retrieval/ source-owned retrieval adapters migrated from GME
mcp_server/ curated read-only tools on the existing service's /mcp/ endpoint
service/ FastAPI management API (api, app, auth, api_models, indices/)
common/ shared helpers copied from GME v2 (canonicalization, cache, …)
module/ dependents scraper + EPFL Graph client
config/
index/ per-index YAML defaults (deploy values env-overridable)
rete/ catalog.json — remote .rete graphs ($RETE_CATALOG_PATH overrides)
seeds/ seed identifier lists for the reingest driver ($SEEDS_DIR overrides)
scripts/ ops tooling (reingest, monolith→split migration, guards)
tests/ index/ + service/ suites (non-live by default)
tools/ Docker image + compose stack
docs/ per-index documentation (start at docs/rag-indices.md)
Apache-2.0 — inherited from git-metadata-extractor, from which
this code was extracted (@ 64f1d14, 2026-07-02).