Repository navigation
Add versioned prompt profiles, output gates, bounded generation concurrency and env-gated LLM client patches - #194
Open
Leon-Algo wants to merge 1 commit into
Conversation
- prompt profile:BaseGenerator 新增 TEMPLATE_KEY/apply_prompt_profile/template, 全部生成器 build_prompt 覆写改为实例方法;prompt_profiles.py 结构校验 + fail-closed;内置 example.v1 通用 profile(内容与官方模板逐字一致) - 输出门注册表:gates.py register_gate/GATES + 内置 non_empty_answer 通用门, GenerateService 增加 prompt_profile/output_gate/llm_concurrency 选项 - 生成并发:llm_concurrency.py 事件循环内有界并发包装 - LLM 客户端 4 个 env 门控补丁:GRAPHGEN_EMPTY_RETRY 空响应有界重试、 GRAPHGEN_EMPTY_EXTRACTION_PREFILL 空抽取 assistant prefill 重试、 GRAPHGEN_DISABLE_THINKING logprob 调用关思考、可选 assistant_prefill 参数; GRAPHGEN_LLM_ACTOR_MAX_CONCURRENCY 提升 Ray actor 并发;logger 空上下文回退 - 未设置任何 env / 选项时行为与官方默认逐字一致;不改动包身份与版本号 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 19, 2026
Leon-Algo
pushed a commit
to Leon-Algo/GraphGen
that referenced
this pull request
Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
graphgen/templates/prompt_profiles.py+BaseGenerator.TEMPLATE_KEY/apply_prompt_profile/template(); all 11 generatorbuild_promptoverrides become instance methods. Profiles are JSON directories structurally validated against the official template constants (fail-closed); built-inexample.v1ships byte-identical official templates as an example. No profile applied → byte-identical official behavior.graphgen/operators/generate/gates.pywithregister_gate/GATESand a genericnon_empty_answergate. No domain-specific gates included.GenerateService(llm_concurrency=N); default unchanged.prompt_profile/output_gate/llm_concurrency— all default to upstream behavior.GRAPHGEN_EMPTY_RETRYbounded empty-response retry (rate-limiter re-applied per attempt),GRAPHGEN_EMPTY_EXTRACTION_PREFILLJSON-compatible assistant prefill{for the schema-guided extractor (the previous tuple-format prefill can never parse againstjson.loads),GRAPHGEN_DISABLE_THINKINGfor logprob calls, andGRAPHGEN_LLM_ACTOR_MAX_CONCURRENCYRay actor option + logger-context fallback.package_datagainstemplates/profiles/*/*.jsononly. Upstream package identity (name/version/url/author) untouched.Second of three PRs split from #192 per review; no PMS assets, no fork identity. PR A (partitioner test fixes) and PR C (event-entity pipeline, builds on this) follow separately.
Validation
pytest tests/unit_tests→ 20 passed (profiles 8, gates 3, llm_concurrency 2, openai patches 4, log 1, plus collection checks).pylint --rcfile=.pylintrc baselines/ graphgen/ webui/→ 10.00/10, zero messages (CI gate green; resolves thearguments-differfindings on all generator overrides noted in Add versioned prompt profiles and event-entity generation pipeline #192).🤖 Generated with Claude Code