Releases: svilupp/PromptingTools.jl
Releases · svilupp/PromptingTools.jl
v0.31.1
PromptingTools v0.31.1
Updated
- Improved the implementation of
RAGTools.unpack_bits
to be faster with fewer allocations.
Commits
Merged pull requests:
v0.31.0
PromptingTools v0.31.0
Breaking Changes
- The return type of
RAGTools.find_tags(::NoTagger,...)
is now::Nothing
instead ofCandidateChunks
/MultiCandidateChunks
with all documents. Base.getindex(::MultiIndex, ::MultiCandidateChunks)
now always returns sorted chunks for consistency with the behavior of othergetindex
methods on*Chunks
.
Updated
- Cosine similarity search now uses
partialsortperm
for better performance on large datasets. - Skip unnecessary work when the tagging functionality in the RAG pipeline is disabled (
find_tags
withNoTagger
always returnsnothing
which improves the compiled code). - Changed the default behavior of
getindex(::MultiIndex, ::MultiCandidateChunks)
to always return sorted chunks for consistency with other similar functions. Note that you should always use re-rankering anyway (seeFlashRank.jl
).
Commits
Merged pull requests:
v0.30.0
PromptingTools v0.30.0
Fixed
- Fixed a bug on Julia 1.11 beta by adding REPL stdlib as a direct dependency.
- Fixed too restrictive argument types for
RAGTools.build_tags
method.
Commits
Merged pull requests:
v0.29.0
PromptingTools v0.29.0
Added
- Added a package extension for FlashRank.jl to support local ranking models. See ?RT.FlashRanker for more information or examples/RAG_with_FlashRank.jl for a quick example.
Commits
Merged pull requests:
Closed issues:
- Allow changing OpenAI key after first load (#161)
v0.28.0
PromptingTools v0.28.0
### Added
- Added Mistral coding-oriented Codestral to the model registry, aliased as codestral or mistralc. It's very fast, performant and much cheaper than similar models.
### Commits
Merged pull requests:
v0.27.0
PromptingTools v0.27.0
Added
- Added a keyword-based search similarity to RAGTools to serve both for baseline evaluation and for advanced performance (by having a hybrid index with both embeddings and BM25). See
?RT.KeywordsIndexer
and?RT.BM25Similarity
for more information, to build usebuild_index(KeywordsIndexer(), texts)
or convert an existing embeddings-based indexChunkKeywordsIndex(index)
.
Updated
- For naming consistency,
ChunkIndex
in RAGTools has been renamed toChunkEmbeddingsIndex
(with an aliasChunkIndex
for backwards compatibility). There are now two main index types:ChunkEmbeddingsIndex
andChunkKeywordsIndex
(=BM25), which can be combined into aMultiIndex
to serve as a hybrid index.
Commits
Merged pull requests:
- Add BM25 Index (#157) (@svilupp)
- Implement E2E Hybrid retrieval (BM25 + embeddings) (#159) (@svilupp)
Closed issues:
- [FR] RAG: Add HybridChunkIndex with BM25 support (#119)
v0.26.2
PromptingTools v0.26.2
Fixed
- Fixed a rare bug where prompt templates created on MacOS will come with metadata that breaks the prompt loader. From now on, it ignores any dotfiles (hidden files starting with ".").
Commits
Merged pull requests:
v0.26.1
PromptingTools v0.26.1
Fixed
- Fixed a bug where utility
length_longest_common_subsequence
was not working with complex Unicode characters
Commits
Merged pull requests:
v0.26.0
PromptingTools v0.26.0
BREAKING CHANGES
- Added new field
meta
toTracerMessage
andTracerMessageLike
to hold metadata in a simply dictionary. Change is backward-compatible. - Changed behaviour of
aitemplates(name::Symbol)
to look for the exact match on the template name, not just a partial match. This is a breaking change for theaitemplates
function only. Motivation is that having multiple matches could have introduced subtle bugs when looking up valid placeholders for a template.
Added
- Improved support for
aiclassify
with OpenAI models (you can now encode upto 40 choices). - Added a template for routing questions
:QuestionRouter
(to be used withaiclassify
) - Improved tracing by
TracerSchema
to automatically capture crucial metadata such as any LLM API kwargs (api_kwargs
), use of prompt templates and its version. Information is captured inmeta(tracer)
dictionary. See?TracerSchema
for more information. - New tracing schema
SaverSchema
allows to automatically serialize all conversations. It can be composed with other tracing schemas, eg,TracerSchema
to automatically capture necessary metadata and serialize. See?SaverSchema
for more information. - Updated options for Binary embeddings (refer to release v0.18 for motivation). Adds utility functions
pack_bits
andunpack_bits
to move between binary and UInt64 representations of embeddings. RAGTools adds the correspondingBitPackedBatchEmbedder
andBitPackedCosineSimilarity
for fast retrieval on these Bool<->UInt64 embeddings (credit to domluna's tinyRAG).
Fixed
- Fixed a bug where
aiclassify
would not work when returning the full conversation for choices with extra descriptions
Commits
Merged pull requests:
- Improvements to aiclassify and aitemplates (#150) (@svilupp)
- Improve tracer schema / automated logging (#151) (@svilupp)
- Add BitPacked embeddings for RAG retrieval (#152) (@svilupp)
- add tracer kwargs (#153) (@svilupp)
Closed issues:
- [FR] Improve performance of Bool embeddings (#144)
v0.25.0
PromptingTools v0.25.0
Added
- Added model registry record for the latest OpenAI GPT4 Omni model (
gpt4o
) - it's as good as GPT4, faster and cheaper.
Commits
Merged pull requests: