1.24.0
Release Notes
Added
- Stdlib ergonomics — routine text/list/number helpers. Added seven builtins that
everyday code kept hand-rolling:math/round-to(round to N decimals) and
math/format-fixed(fixed-decimal display string);string/lines(split on line
endings, Clojuresplit-linessemantics);list/contains?(boolean membership, vs
member's Scheme tail),list/nth-or(safe indexed access with a default), and
list/take-last/list/drop-last(tail counterparts totake/drop). The RAG
example now leans entirely on stdlib (list/chunk,flat-map,string/take,
math/round-to) instead of local helpers.
Changed
-
Eval test macros emit one test per case. With the tree-walker retired,
eval_str
andeval_str_compiledare the same path, soeval_tests!/eval_error_tests!no
longer generate redundant_tw+_vmpairs — halving the eval test count with no
loss of coverage. -
Reranking + a full RAG pipeline. New
llm/rerankcross-encoder reranking over
Cohere / Jina / Voyage (the same key already used for embeddings) —(llm/rerank query documents {:top-k 5 :model "..." :provider :cohere})returns{:index :score :document}
maps, highest relevance first. This completes the retrieve-many → rerank-to-a-few RAG
recipe withllm/embed+vector-store/*+llm/complete. The vector-store search and
rerank steps emit OpenInferenceRETRIEVER/RERANKERspans (retrieval.documents.*,
reranker.*) so a full RAG trace renders natively in Phoenix/Arize. New worked example
examples/llm/rag-docs-search.sema(indexes Sema's own docs;make rag-demo), a
RAG guide, and a FakeProvider regression test. -
OpenTelemetry tags, metadata & streaming time-to-first-token (compat layer). With a
SEMA_OTEL_COMPATmode on, every LLM span is now auto-tagged with
operation:/provider:/model:(+cache-hit), and you can pass:tags(a list) and
:metadata(a map) tollm/complete,llm/chat,llm/stream, andagent/run— tags
merge with the auto-tags, metadata fans out to each backend's native field
(langfuse.trace.metadata.*,langsmith.metadata.*,traceloop.association.properties.*,
braintrust.metadata). Streamed calls record time-to-first-token
(sema.gen_ai.server.time_to_first_tokenalways-on; Langfusecompletion_start_time+
Traceloopgen_ai.is_streamingunder compat) — a signal almost no other emitter
reports. LangSmith now also gets its ownlangsmith.trace.session_id, and
Langfuse alangfuse.releasefromSEMA_OTEL_RELEASE. Verified end-to-end against a live
OTel Collector (HTTP + gRPC) and Jaeger with real provider calls; regression test in
crates/sema/tests/otel_tags_test.rs. -
OpenTelemetry per-direction cost split & embedding detail (OpenInference compat). LLM
spans now also carryllm.cost.prompt/llm.cost.completionnext tollm.cost.total
(so Phoenix/Arize show the prompt-vs-completion cost breakdown), and embeddings spans
carryembedding.model_nameplus (content-gated, capped)embedding.embeddings.{i}.embedding.text.
Documentation
- Website docs audit + reference coverage. Documented the nine new builtins
(math/round-to,math/format-fixed,string/lines,list/contains?,list/nth-or,
list/take-last,list/drop-last,io/read-line,io/eof?) on their stdlib pages,
added the OTel cost-split/embedding-detail attributes to the compat doc, and gave the
RAG/rerank guide a depth pass (score semantics, top-k, cost/scaling, error handling,
observability). Fixed copy-paste examples that didn't run:shellreturns a map
(:stdout/:stderr/:exit-code), the web-server demo's streaming/summarize/extract
handlers (llm/stream,llm/complete, andllm/extract's schema-first argument order).
Install sema-lang 1.24.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/HelgeSverre/sema/releases/download/v1.24.0/sema-lang-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/HelgeSverre/sema/releases/download/v1.24.0/sema-lang-installer.ps1 | iex"Install prebuilt binaries via Homebrew
brew install helgesverre/tap/sema-langDownload sema-lang 1.24.0
| File | Platform | Checksum |
|---|---|---|
| sema-lang-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
| sema-lang-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
| sema-lang-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
| sema-lang-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
| sema-lang-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |