Releases: svilupp/PromptingTools.jl
Releases · svilupp/PromptingTools.jl
v0.54.0
PromptingTools v0.54.0
Updated
- Improved the performance of BM25/Keywords-based indices for >10M documents. Introduced new kwargs of
min_term_freq
andmax_terms
inRT.get_keywords
to reduce the size of the vocabulary. See?RT.get_keywords
for more information.
Commits
Merged pull requests:
v0.53.0
PromptingTools v0.53.0
Added
- Added beta headers to enable long outputs (up to 8K tokens) with Anthropic's Sonnet 3.5 (see
?anthropic_extra_headers
). - Added a kwarg to prefill (
aiprefill
) AI responses with Anthropic's models to improve steerability (see?aigenerate
).
Updated
- Documentation of
aigenerate
to make it clear that ifstreamcallback
is provide WITHflavor
set, there is no automatic configuration and the user must provide the correctapi_kwargs
. - Grouped Anthropic's beta headers as a comma-separated string as per the latest API specification.
Commits
Merged pull requests:
v0.52.0
PromptingTools v0.52.0
Added
- Added a new EXPERIMENTAL
streamcallback
kwarg foraigenerate
with the OpenAI and Anthropic prompt schema to enable custom streaming implementations. Simplest usage is simply withstreamcallback=stdout
, which will print each text chunk into the console. System is modular enabling custom callbacks and allowing you to inspect received chunks. See?StreamCallback
for more information. It does not support tools yet.
Commits
Merged pull requests:
v0.51.0
PromptingTools v0.51.0
Added
Added more flexible structured extraction with aiextract -> now you can simply provide the field names and, optionally, their types without specifying the struct itself (in aiextract, provide the fields like return_type = [:field_name => field_type]).
Added a way to attach field-level descriptions to the generated JSON schemas to better structured extraction (see ?update_schema_descriptions! to see the syntax), which was not possible with struct-only extraction.
Commits
Merged pull requests:
- styling issues (#199) (@lazarusA)
- Add assertion for empty docs in
get_embeddings
(#200) (@iuliadmtru) - Fix documentation for building RAG (#201) (@iuliadmtru)
- Update Structured Extraction (#202) (@svilupp)
v0.50.0
PromptingTools v0.50.0
Breaking Changes
AIMessage
andDataMessage
now have a new fieldextras
to hold any API-specific metadata in a simple dictionary. Change is backward-compatible (defaults tonothing
).
Added
- Added EXPERIMENTAL support for Anthropic's new prompt cache (see ?
aigenerate
and look forcache
kwarg). Note that COST estimate will be wrong (ignores the caching discount for now). - Added a new
extras
field toAIMessage
andDataMessage
to hold any API-specific metadata in a simple dictionary (eg, used for reporting on the cache hit/miss).
Commits
Merged pull requests:
v0.49.0
v0.48.0
PromptingTools v0.48.0
Added
- Implements the new OpenAI structured output mode for
aiextract
(just provide kwargstrict=true
). Reference blog post.
Commits
Merged pull requests:
Closed issues:
v0.47.0
v0.46.0
v0.45.0
PromptingTools v0.45.0
Breaking Change
getindex(::MultiIndex, ::MultiCandidateChunks)
now returns sorted chunks by default (sorted=true
) to guarantee that potentialcontext
(=chunks
) is sorted by descending similarity score across different sub-indices.
Updated
- Updated a
hcat
implementation inRAGTools.get_embeddings
to reduce memory allocations for large embedding batches (c. 3x fewer allocations, seehcat_truncate
). - Updated
length_longest_common_subsequence
signature to work only for pairs ofAbstractString
to not fail silently when wrong arguments are provided.
Fixed
- Changed the default behavior of
getindex(::MultiIndex, ::MultiCandidateChunks)
to always return sorted chunks for consistency with other similar functions and correctretrieve
behavior. This was accidentally changed in v0.40 and is now reverted to the original behavior.
Commits
Merged pull requests: