Release v0.7.8a0: Official HED docs in system prompt#139
Merged
Conversation
* Move semantic hints from system prompt to user prompt System prompt is now static per schema version, enabling prompt caching across requests. Semantic hints (which change per image/description) are placed in the user prompt instead. The system prompt includes a pointer instructing the LLM to check the user message for hints. Fixes #129 * Address review findings for cache-friendly prompts - Rename _format_semantic_hints to format_semantic_hints (public API, used cross-module) - Align header: system prompt pointer and actual section both say "SEMANTIC HINTS" - Soften system prompt wording to "may include" (hints are optional) - Skip hints with empty tag keys - Add debug logging when hints are included in user prompt - Add 10 tests: user prompt with/without hints, confidence bucketing, system prompt caching invariant
- Evaluation: qwen/qwen3-235b-a22b-2507 -> qwen/qwen3.5-397b-a17b (most capable Qwen MoE, $0.39/M prompt) - Vision: qwen/qwen3-vl-30b-a3b-instruct -> qwen/qwen3-vl-32b-instruct (newer VL model, $0.10/M prompt) - Annotation: keep anthropic/claude-haiku-4.5 (unchanged) - Replace all legacy gpt-oss-120b references in defaults and docs - Provider: let OpenRouter auto-route for Qwen models
Pull HedAnnotationSemantics.md and 02_Terminology.md from hed-standard GitHub repos into the annotation agent system prompt. Add fetch script, docs loader, weekly CI update workflow, and bundled docs in src/data/hed-docs/. Removes 10 hand-written builder functions from hed_comprehensive_guide.py, keeps HEDit-specific sections (vocabulary check, correction workflow, error troubleshooting, output format). Deletes legacy hed_rules.py. Closes #137, closes #69, closes #100
- Fix empty docs caching permanently in long-running processes (only cache non-empty results, allow retry) - Add logger.debug() to _get_docs_dir() importlib.resources fallback - Add per-document error handling in fetch loop (partial failures no longer kill entire fetch) - Add corrupt manifest recovery in load_manifest() - Add OSError handling in main() for filesystem errors - Replace all unittest.mock usage with tmp_path (no mocks policy) - Add docs_dir parameter to load_hed_docs/get_comprehensive_hed_guide for testability without mocks - Add 16 direct unit tests for clean_myst_markdown() parser - Fix list-table multiline cell handling (continuation lines were creating new cells instead of appending to current cell) - Fix stale docstrings (format_semantic_hints source field, _build_official_docs_section history-focused description) - Re-fetch bundled docs with fixed parser
Deploying hedit with
|
| Latest commit: |
258acc0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://31b92d11.hedit.pages.dev |
| Branch Preview URL: | https://develop.hedit.pages.dev |
| # Do NOT cache empty results; allow retry in long-running processes | ||
| return result | ||
|
|
||
| _cached_docs = result |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Corrects the accidental alpha bump; develop uses .dev suffix per versioning rules. Alpha will be set when merging to main.
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
Closes #137, closes #69, closes #100
Test plan