Skip to content

feat(query): accept external seed files for traversal#1783

Open
shura-v wants to merge 1 commit into
Graphify-Labs:v8from
shura-v:feature/query-explicit-seeds
Open

feat(query): accept external seed files for traversal#1783
shura-v wants to merge 1 commit into
Graphify-Labs:v8from
shura-v:feature/query-explicit-seeds

Conversation

@shura-v

@shura-v shura-v commented Jul 10, 2026

Copy link
Copy Markdown

Summary

graphify query currently always selects traversal seeds from the question text. That makes it hard for external retrieval or reranking tools to hand graphify an ordered set of known node ids while still using graphify's native traversal and output path.

This adds --seed-file for JSON arrays of string node ids. When provided, query skips internal seed scoring, validates the ids against the graph, preserves array order for rendered seed nodes, and logs the seed list in querylog. Ranking is represented only by array order; graphify does not need to know scores or metadata. The normal query path is unchanged when no seed file is provided.

The generated query skill reference now documents this as an external-tooling path: if ordered graph node ids already exist from external retrieval or reranking, pass them via --seed-file.

Tests

  • python -m tools.skillgen --check
  • pytest tests/test_query_cli.py tests/test_querylog.py tests/test_skillgen.py
  • ruff check graphify/serve.py graphify/cli.py graphify/__main__.py tests/test_query_cli.py tests/test_querylog.py tests/test_skillgen.py

graphify query always selected traversal seeds from the question text, which made it hard for external retrieval or reranking to hand graphify an ordered set of known node ids while still using the native traversal and output path.

Add --seed-file for JSON arrays of string node ids. When provided, query skips internal seed scoring, validates the ids against the graph, preserves array order for rendered seed nodes, and logs the seed list in querylog. The normal query path is unchanged when no seed file is provided.

Regressions cover string-only seed files, duplicate removal, unknown ids, rendered seed order, querylog metadata, and the generated skill reference.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant