feat(ingest): resolve project labels with Jev
CI / quality (push) Canceled after 0s

This commit is contained in:
vasily committed 2026-10-15 10:53:30 +08:00
1 parent 0e1a2ad008
commit 34f4923566
28 files changed
+3932 -81

No files matched your search

+1 -1
View File
@@ -121,4 +121,4 @@ The authenticated `source_capture_url` tool blocks all requests unless the servi
### Optional Jev relevance signal
The backend can call OpenRouter's Jev Decisions API when it records an ingest-review flag. Add `OPENROUTER_API_KEY` to the ignored `.env` file (`.env.example` is a template), then restart `gewu-api`. The app restricts `.env` permissions to the current user. It sends the project title, north star, key questions, candidate excerpt, summary and rationale to Jev for a relevance probability and research-lens suggestion. The score is advisory; unavailable Jev never blocks proposal submission. Keep the key on the server and out of browser or agent configuration. See OpenRouter's [Jev API guide](https://openrouter.ai/docs/guides/community/jev-tutorial) for API and billing details.
The backend can call OpenRouter's Jev Decisions API when it records an ingest-review flag. Add `OPENROUTER_API_KEY` to the ignored `.env` file (`.env.example` is a template), then restart `gewu-api`. The app restricts `.env` permissions to the current user. It sends the project title, north star, key questions, candidate excerpt, summary and rationale to Jev for a relevance probability and research-lens suggestion. For facet labels, it also sends each agent-proposed candidate and the closest labels from that project so Jev can score fit and choose an existing label or the `new_label` option; Jev chooses among the candidate text supplied and does not invent label wording. The backend adds a new label to the canonical project catalog only when Jev selects new, the candidate ranks within the configured top N for its facet, and fit, new-label probability and choice confidence meet their thresholds. Defaults are tags top 5 and audience/use_for/domain top 3 each, fit >= 0.90, new-label probability >= 0.90 and confidence >= 0.80. This automation also requires the local embedding model to be installed and configured with `GEWU_EMBEDDING_MODEL_PATH` and its verified `GEWU_EMBEDDING_MODEL_SHA256`; use `.env.example` for optional model and threshold settings. GEWU never downloads model weights at service startup. Without Jev or embeddings, ingest and the review queue continue, but the service does not auto-add labels. Keep the key on the server and out of browser or agent configuration. See OpenRouter's [Jev API guide](https://openrouter.ai/docs/guides/community/jev-tutorial) for API and billing details.