Use Cases / rag-relevance
Jev RAG 関連性
リトリーバはニアミスを返す。LLM に詰め込むとトークンを浪費し回答を混乱させる。
Try a related template free on this host — 5 anonymous real-API runs with no signup — then ship the same schema with a prepaid jv_live_ key. See is Jev free? and playground.
Why Jev
各チャンクに関連性/keep-drop の Score または Noul を付け、圧縮を型付きのまま保つ —— 証拠の損失リライトではない。
How to define the decision
取得チャンクごとに state = クエリ + チャンク本文。関連性 / keep に Noul または Score。worker が並列化できるなら decide をバッチ。
When to use Jev
- 取得後の keep / truncate / drop
- 生成前のマルチコーパスルーティング
- 大半のチャンクがノイズの高ボリューム RAG
When not to use Jev
- 最終のユーザー向け回答生成
- 埋め込み / インデックス構築そのもの
- 多ソースにまたがる長い創作的統合
Sample input and output
From the live tool template. Run it in the playground for a real API response — sample labels below are illustrative until you click Run.
Input
query: How do I rotate my API key? passage: To rotate a key, open Settings > API keys, click Revoke, then Create new key.
Sample display fields
- relevant: yes · 95%
- relevance: direct answer · 92%
プロンプト組み立て前に低関連チャンクを落とす。境界スコア → 短い抜粋を残すか安い再ランカーへ。欠落証拠を捏造しない。
Failure modes and human fallback
- Upstream or network errors: retry with backoff; do not invent a decision.
- Low confidence: route to a human queue or safer default — never auto-act on money/destructive tools.
- Schema drift: keep a golden fixture set in CI so label changes fail the build before production.
- Jev は文書を埋め込み・インデックスしない —— 渡したテキストの関連性だけ判定。
- 最終回答生成は生成 LLM に任せる。
- fail closed:decide エラー時はチャンクをスキップするか現行 top-k ポリシーにフォールバック。
API example
Same prepaid jv_live_ balance as tools. Output tokens are free on this host's metering model.
curl https://jevtypesafe.org/api/v1/decide \
-H "Authorization: Bearer jv_live_YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"state":"RAG check\nQuery: How do I rotate my API key?\nPassage:\nTo rotate a key, open Settings > API keys, click Revoke, then Create new key.","questions":{"relevant":{"type":"noul","instructions":"Does this passage help answer the query?"},"relevance":{"type":"choice","instructions":"How does the passage relate to the query?","criteria":{"direct answer":"directly answers","related":"related but incomplete","tangential":"weakly related","irrelevant":"does not help"}},"supports_claim":{"type":"noul","instructions":"Does the passage support answering without inventing facts?"}}}'FAQ
- ワンクリックツールはありますか?
- 利用可能なら Tools の RAG Relevance を開くか、リトリーバ worker で関連性質問を /api/v1/decide に配線します。
Related use cases
Ready to build?
Free anonymous tool runs, then prepaid packs and a jv_live_ key — independent host, not affiliated with TypeSafe AI.