Skip to content

Releases: svilupp/PromptingTools.jl

v0.20.1

18 Apr 09:04
Compare
Choose a tag to compare

PromptingTools v0.20.1

Diff since v0.20.0

### Fixed

  • Fixed truncate_dimension to ignore when 0 is provided (previously it would throw an error).

Commits

Merged pull requests:

v0.20.0

17 Apr 21:02
Compare
Choose a tag to compare

PromptingTools v0.20.0

Diff since v0.19.0

Added

  • Added a few new open-weights models hosted by Fireworks.ai to the registry (DBRX Instruct, Mixtral 8x22b Instruct, Qwen 72b). If you're curious about how well they work, try them!
  • Added basic support for observability downstream. Created custom callback infrastructure with initialize_tracer and finalize_tracer and dedicated types are TracerMessage and TracerMessageLike. See ?TracerMessage for more information and the corresponding aigenerate docstring.
  • Added MultiCandidateChunks which can hold candidates for retrieval across many indices (it's a flat structure to be similar to CandidateChunks and easy to reason about).
  • JSON serialization support extended for RAGResult, CandidateChunks, and MultiCandidateChunks to increase observability of RAG systems
  • Added a new search refiner TavilySearchRefiner - it will search the web via Tavily API to try to improve on the RAG answer (see ?refine!).
  • Introduced a few small utilities for manipulation of nested kwargs (necessary for RAG pipelines), check out getpropertynested, setpropertynested, merge_kwargs_nested.

Updated

  • [BREAKING] change to CandidateChunks where it's no longer allowed to be nested (ie, cc.positions being a list of several CandidateChunks). This is a breaking change for the RAGTools module only. We have introduced a new MultiCandidateChunks types that can refer to CandidateChunks across many indices.
  • Changed default model for RAGTools.CohereReranker to "cohere-rerank-english-v3.0".

Fixed

  • wrap_string utility now correctly splits only on spaces. Previously it would split on newlines, which would remove natural formatting of prompts/messages when displayed via pprint

Commits

Merged pull requests:

Closed issues:

  • [Question/FR] Using some HugginFace models (#127)
  • [DOCS] Markdown is not parsed in hero cards, use <pre> instead! (#128)
  • Make REPL mode (#131)

v0.19.0

10 Apr 06:45
Compare
Choose a tag to compare

PromptingTools v0.19.0

Diff since v0.18.0

Added

  • [BREAKING CHANGE] The default GPT-4 Turbo model alias ("gpt4t") now points to the official GPT-4 Turbo endpoint ("gpt-4-turbo").
  • Adds references to mistral-tiny (7bn parameter model from MistralAI) to the model registry for completeness.
  • Adds the new GPT-4 Turbo model ("gpt-4-turbo-2024-04-09"), but you can simply use alias "gpt4t" to access it.

Commits

Merged pull requests:

v0.18.0

05 Apr 13:38
Compare
Choose a tag to compare

PromptingTools v0.18.0

Diff since v0.17.1

Added

  • Adds support for binary embeddings in RAGTools (dispatch type for find_closest is finder=BinaryCosineSimilarity()), but you can also just convert the embeddings to binary yourself (always choose Matrix{Bool} for speed, not BitMatrix) and use without any changes (very little performance difference at the moment).
  • Added Ollama embedding models to the model registry ("nomic-embed-text", "mxbai-embed-large") and versioned MistralAI models.
  • Added template for data extraction with Chain-of-thought reasoning: :ExtractDataCoTXML.
  • Added data extraction support for Anthropic models (Claude 3) with aiextract. Try it with Claude-3 Haiku (model="claudeh") and Chain-of-though template (:ExtractDataCoTXML). See ?aiextract for more information and check Anthropic's recommended practices.

Fixed

Commits

Merged pull requests:

v0.17.1

27 Mar 13:29
Compare
Choose a tag to compare

PromptingTools v0.17.1

Diff since v0.17.0

Fixed

  • Fixed a bug in print_html where the custom kwargs were not being passed to the HTML constructor.

Commits

Merged pull requests:

v0.17.0

27 Mar 10:21
Compare
Choose a tag to compare

PromptingTools v0.17.0

Diff since v0.16.1

Added

  • Added support for aigenerate with Anthropic API. Preset model aliases are claudeo, claudes, and claudeh, for Claude 3 Opus, Sonnet, and Haiku, respectively.
  • Enabled the GoogleGenAI extension since GoogleGenAI.jl is now officially registered. You can use aigenerate by setting the model to gemini and providing the GOOGLE_API_KEY environment variable.
  • Added utilities to make preparation of finetuning datasets easier. You can now export your conversations in JSONL format with ShareGPT formatting (eg, for Axolotl). See ?PT.save_conversations for more information.
  • Added print_html utility for RAGTools module to print HTML-styled RAG answer annotations for web applications (eg, Genie.jl). See ?PromptingTools.Experimental.RAGTools.print_html for more information and examples.

Commits

Merged pull requests:

Closed issues:

  • [FR] Add support for Claude API (#96)

v0.16.1

21 Mar 21:48
Compare
Choose a tag to compare

PromptingTools v0.16.1

Diff since v0.16.0

Fixed

  • Fixed a bug where set_node_style! was not accepting any Stylers expect for the vanilla Styler.

Commits

Merged pull requests:

v0.16.0

20 Mar 20:48
Compare
Choose a tag to compare

PromptingTools v0.16.0

Diff since v0.15.0

Added

  • Added pretty-printing via PT.pprint that does NOT depend on Markdown and splits text to adjust to the width of the output terminal.
    It is useful in notebooks to add newlines.
  • Added support annotations for RAGTools (see ?RAGTools.Experimental.annotate_support for more information) to highlight which parts of the generated answer come from the provided context versus the model's knowledge base. It's useful for transparency and debugging, especially in the context of AI-generated content. You can experience it if you run the output of airag through pretty printing (PT.pprint).
  • Added utility distance_longest_common_subsequence to find the normalized distance between two strings (or a vector of strings). Always returns a number between 0-1, where 0 means the strings are identical and 1 means they are completely different. It's useful for comparing the similarity between the context provided to the model and the generated answer.
  • Added a new documentation section "Extra Tools" to highlight key functionality in various modules, eg, the available text utilities, which were previously hard to discover.
  • Extended documentation FAQ with tips on tackling rate limits and other common issues with OpenAI API.
  • Extended documentation with all available prompt templates. See section "Prompt Templates" in the documentation.
  • Added new RAG interface underneath airag in PromptingTools.RAGTools.Experimental. Each step now has a dedicated function and a type that can be customized to achieve arbitrary logic (via defining methods for your own types). airag is split into two main steps: retrieve and generate!. You can use them separately or together. See ?airag for more information.

Updated

  • Renamed split_by_length text splitter to recursive_splitter to make it easier to discover and understand its purpose. split_by_length is still available as a deprecated alias.

Fixed

  • Fixed a bug where LOCAL_SERVER default value was not getting picked up. Now, it defaults to http://localhost:10897/v1 if not set in the preferences, which is the address of the server started by Llama.jl.
  • Fixed a bug in multi-line code annotation, which was assigning too optimistic scores to the generated code. Now the score of the chunk is the length-weighted score of the "top" source chunk divided by the full length of score tokens (much more robust and demanding).

Commits

Merged pull requests:

Closed issues:

  • Wrong syntax in README (#93)

v0.15.0

01 Mar 19:58
Compare
Choose a tag to compare

PromptingTools v0.15.0

Diff since v0.14.0

Added

  • Added experimental support for image generation with OpenAI DALL-E models, eg, msg = aiimage("A white cat on a car"). See ?aiimage for more details.

Commits

Merged pull requests:

v0.14.0

29 Feb 09:40
Compare
Choose a tag to compare

PromptingTools v0.14.0

Diff since v0.13.0

Added

  • Added a new documentation section "How it works" to explain the inner workings of the package. It's a work in progress, but it should give you a good idea of what's happening under the hood.
  • Improved template loading, so if you load your custom templates once with load_templates!("my/template/folder), it will remember your folder for all future re-loads.
  • Added convenience function create_template to create templates on the fly without having to deal with PT.UserMessage etc. If you specify the keyword argument load_as = "MyName", the template will be immediately loaded to the template registry. See ?create_template for more information and examples.

Commits

Merged pull requests: