Compile: one root relations.jsonl caps knowledge-graph size (collisions must rewrite the whole file within max_tokens)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Read bot/vikingbot/compile/ops/reduce.py around resolve_files and reduce_group, then bot/vikingbot/compile/pipeline_io.py for the output limit. Compare the collision merge and incremental refresh paths with the knowledge-graph Skill’s relations.jsonl output. Done means large graphs can be merged or refreshed beyond one response’s token limit; the issue lists deterministic merging, append or patch outputs, and sharding as possible approaches.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Version
- OpenViking core 0.5.3 (
178a8cdfb) - Compile:
bot/vikingbot/compilefrom main4b92b3065 - LiteLLM 1.102.4, OpenAI model,
vlm.max_tokensleft at the default - Workload:
examples/compile/ov-compile-skills/knowledge-graphSkill, directory compile, 25 to 45 transcript files per batch
Problem
The knowledge-graph Skill writes every edge to a single root relations.jsonl (SKILL.md, "Typed edges", and the final check "the final artifact tree contains the complete entity set and relations.jsonl"). Every Reduce group that produces edges therefore emits a candidate at the same path, and every incremental refresh recalls the existing file.
Both paths require the model to write the whole file in one response:
- Same-path collisions:
resolve_filesinbot/vikingbot/compile/ops/reduce.py(around L98 to L160) asks the model to "Submit complete files ... without patches or base_hash". The mergedrelations.jsonlmust fit in one model output. - Incremental refresh:
reduce_group(around L218 to L226) loads each recalled target file whole intoold[path]with no size budget, and the model must again return the complete file. - The output ceiling is
vlm.max_tokens,DEFAULT_MAX_TOKENS = 32_000inbot/vikingbot/compile/pipeline_io.py(L37). A response that stops withfinish_reasonlengthraises "Output limit reached; reduce result size or use file references for agent files" (around L500).
At roughly 250 bytes per edge line, 32k output tokens allows about 400 to 500 edges before a collision or refresh of relations.jsonl can no longer be written. Our corpus projects to 3,400 to 10,000 edges, so a single target cannot hold it. Entity pages do not hit this because they are one file per entity.
Minimal reproduction
We avoided this path with the workaround below, so the failure here is derived from the code path and the size projection rather than a captured run log.
- Run
ov compilewith the knowledge-graph Skill on a directory large enough to produce more than one Reduce group, with combined edges above about 500. - Each group emits
relations.jsonl;resolve_filessends all candidates to onereduce_mergecall. - Expected from the code: the merge response hits the output limit (
finish_reason=length),pipeline_io.pyraises "Output limit reached", andresolve_filesrecordsUnresolved output path relations.jsonland marks the records behind it failed. Retrying (as in PR #7124) cannot help, since the required output is larger than the limit. - The same applies to an incremental refresh of a target whose existing
relations.jsonlis already near the limit.
Expected
Graph size should be bounded by storage and input budgets, not by one model response.
Workaround we use
We compile each batch into its own target, then merge the per-batch graphs outside Compile with a deterministic script (no model): entity pages are joined by normalized id, edges are keyed by (from, relation, to) with their evidence lists united, and the result is checked with examples/compile/graph-show/knowledge-graph/knowledge_graph.py before publishing. This works, but it duplicates logic Compile already has and gives up incremental refresh.
Ask
Any one of these would remove the ceiling:
- Merge line-oriented files such as
relations.jsonldeterministically inresolve_files(union of lines keyed byfrom,relation,to, evidence united), instead of a model rewrite. - Allow append or patch outputs (for example
base_hashplus added lines) for collision and refresh outputs, so the model only writes new edges. - Or change the Skill to shard edges, for example one edge file per source entity (
relations/<from-id>.jsonl), so each file stays small.
Related: #6370 (Reduce input injection has no budget), #7124 (recovery after output exhaustion).
- Lingua principale
- Python
- Stelle
- 41.8k
- Fork
- 3.4k
- Merge medio
- 19h 29m
- PR unite (30g)
- 500
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di volcengine/OpenViking
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
volcengine/OpenViking#7485 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
volcengine/OpenViking#7210 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
volcengine/OpenViking#7205 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Retrieval rerank fallback statistics stay zero after provider failureForse già presa @97Three l’ha presa 8 giorni fa. Apertabug kernel
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
volcengine/OpenViking#7014 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: memory.prefetch_search_topn is inert above 5 (call site omits limit), plus two docstrings state the wrong defaultsForse già presa @peterzhang987723 l’ha presa 8 giorni fa. Apertakernel
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
volcengine/OpenViking#6923 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di volcengine/OpenViking
Issue simili
-
fuzz fuzz-unconfirmed
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Switch to ruffAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Qiskit/qiskit-aer#2533 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
etesync/etesync-dav#376 ·