Skip to content

Release v0.7.6a1: keyword extraction, streaming telemetry, prompt caching#135

Merged
neuromechanist merged 3 commits into
mainfrom
develop
Mar 30, 2026
Merged

Release v0.7.6a1: keyword extraction, streaming telemetry, prompt caching#135
neuromechanist merged 3 commits into
mainfrom
develop

Conversation

@neuromechanist

Copy link
Copy Markdown
Member

Summary

This release adds three features to improve annotation quality, observability, and performance for complex descriptions and images.

Keyword extraction for semantic preprocessing (#124, #126)

  • LLM-based keyword extraction before LSP tag suggestion (replaces raw description-to-LSP flow)
  • Per-keyword LSP queries with deduplication and scoring via asyncio.to_thread (non-blocking)
  • hed-suggest CLI installed in both Dockerfiles for production semantic search
  • no_extend flag propagated through all API, CLI, client, and executor paths

Streaming telemetry (#125, #127)

  • _collect_stream_telemetry helper for /annotate/stream and /annotate-from-image/stream
  • Telemetry on both success and error paths
  • Fixed temperature 0.0 or-chaining bug in all endpoints

Cache-friendly prompts (#129, #130)

  • Moved semantic hints from system prompt to user prompt
  • System prompt is now static per schema version, enabling prompt caching across requests
  • Batch processing of N images pays the system prompt cost only once

CI dependency bumps

  • actions/checkout 4 -> 6, upload/download-artifact v7/v8, Docker actions v7
  • wrangler 4.58.0 -> 4.61.1

Test plan

  • 465 unit tests pass
  • All three PRs reviewed by code-reviewer, silent-failure-hunter, and test-analyzer
  • All review findings addressed
  • Dev container telemetry confirms 23 events captured (vs 1 before)
  • Image annotations reaching valid status in production

neuromechanist and others added 2 commits March 30, 2026 03:45
* 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
@codecov

codecov Bot commented Mar 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Mar 30, 2026

Copy link
Copy Markdown

Deploying hedit with  Cloudflare Pages  Cloudflare Pages

Latest commit: acf0638
Status: ✅  Deploy successful!
Preview URL: https://b972b818.hedit.pages.dev
Branch Preview URL: https://develop.hedit.pages.dev

View logs

@neuromechanist neuromechanist merged commit 2d15515 into main Mar 30, 2026
26 checks passed
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