README-work

LLM::Resources

Raku package with different subs and CLI scripts for specific but repeatable LLM-based workflows.

For usage examples see:

There are several options for using LLMs with this package:

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.sh

To 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::Resources

From GitHub:

zef install https://github.com/antononcube/Raku-LLM-Resources.git

Comprehensive text summarization

Here is the usage message of CLI script llm-text-summarization:

llm-text-summarization --help

Here is an example usage:

llm-text-summarization some-large-text.txt -o summary.md --conf=ollama::gpt-oss:20b

Code 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.

LLM::Resources v0.0.2

Different subs and CLI scripts for specific but repeatable LLM-based workflows.

Authors

  • Anton Antonov

License

Artistic-2.0

Dependencies

DSL::Examples:ver<0.0.3+>Data::Importers:ver<0.1.7+>Data::Translators:ver<0.1.16+>Graph:ver<0.0.30+>Hash::Merge:ver<2.0.0>:api<2>JSON::Fast:ver<0.17+>LLM::Functions:ver<0.4.1+>LLM::Prompts:ver<0.2.5+>LLM::Graph:ver<0.0.10+>ML::NLPTemplateEngine:ver<0.1.8+>ML::FindTextualAnswer:ver<0.2.8+>Text::SubParsers:ver<0.1.2+>

Test Dependencies

Provides

  • LLM::Resources
  • LLM::Resources::Graphs

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.