README-work
LLM::Resources
Raku package with different subs and CLI scripts for specific but repeatable LLM-based workflows.
For usage examples see:
The sections below
Jupyter notebook "Basic-usage.ipynb"
The script "Basic-usage.raku"
There are several options for using LLMs with this package:
Install and run Ollama
For the corresponding setup see "WWW::Ollama"
Run a llamafile / LLaMA model
For the corresponding setup see "WWW::LLaMA"
Have programmatic access to LLMs of service providers like OpenAI or Gemini
For the corresponding setup see "WWWW::OpenAI", "WWWW::Gemini", or "WWW::MistralAI"
Installation
Preliminary installations (optional)
The code generation LLM-graphs use the package "DSL::Translators" which is somewhat "heavy" to install because of its multiple dependencies. A faster installation -- without testing -- can be done with this script.
Here is an example of such installation:
curl -O https://raw.githubusercontent.com/antononcube/RakuForPrediction-book/refs/heads/main/scripts/raku-dsl-install.sh
source raku-dsl-install.shTo check successful installation use the following command in a terminal:
dsl-translation 'use dfTitanic; filter by sex is male; show counts'(Meaningful code should be obtained.)
The package installation
From Zef ecosystem:
zef install LLM::ResourcesFrom GitHub:
zef install https://github.com/antononcube/Raku-LLM-Resources.gitComprehensive text summarization
Here is the usage message of CLI script llm-text-summarization:
llm-text-summarization --helpHere is an example usage:
llm-text-summarization some-large-text.txt -o summary.md --conf=ollama::gpt-oss:20bCode generation
use LLM::Functions;
use LLM::Resources;
my $spec = q:to/END/;
new recommender object;
load dataset @dsData;
make document term matrix;
apply LSI functions IDF, None, Cosine;
recommend by profile for passengerSex:male, and passengerClass:1st;
join across with @dsData on "id";
echo the pipeline value;
END
my $llm-evaluator = llm-evaluator('Ollama', model => 'gemma3:4b');
my $gBestCode = llm-resource-graph('code-generation-by-fallback', input => {:$spec, lang => 'Raku', :split}, :$llm-evaluator);$gBestCode.nodes<code><result>References
Articles, blog posts
[AA1] Anton Antonov, "Agentic-AI for text summarization", (2025), RakuForPrediction at WordPress. (GitHub.)
[AA2] Anton Antonov, "Day 6 ā Robust code generation combining grammars and LLMs", (2025), Raku Advent Calendar at WordPress. (GitHub, Wolfram Community.)
Packages
[AAp1] Anton Antonov LLM::Functions, Raku package, (2023-2026), GitHub/antononcube.
[AAp2] Anton Antonov LLM::Prompts, Raku package, (2023-2025), GitHub/antononcube.
[AAp3] Anton Antonov DSL::Examples, Raku package, (2024-2025), GitHub/antononcube.
[AAp4] Anton Antonov DSL::Translators, Raku package, (2020-2026), GitHub/antononcube.
[AAp5] Anton Antonov ML::NLPTemplateEngine, Raku package, (2023-2025), GitHub/antononcube.
[AAp6] Anton Antonov WWW::OpenAI, Raku package, (2023-2026), GitHub/antononcube.
[AAp7] Anton Antonov WWW::Gemini, Raku package, (2023-2025), GitHub/antononcube.
[AAp8] Anton Antonov WWW::MistralAI, Raku package, (2023-2024), GitHub/antononcube.
[AAp9] Anton Antonov WWW::LLaMA, Raku package, (2024-2025), GitHub/antononcube.
[AAp10] Anton Antonov WWW::Ollama, Raku package, (2026), GitHub/antononcube.