☷ ℝ  —  ⅟ release: 2025-10-28 ( 2 )  —  rev.: 17  —  transl.:  EN  ·  DE  ·  FR  ·  ES  —  goto:  .⟰.  ·  RAF  ·  Q&A  —   : PDF 


How to use Katia for educating Katia

  • 1st edition, explains how the Katia framework can be used for educating Katia AI agent, by a human.
  • 2nd edition, presents the methodology behind an use-case of a freely-available chatbot prepared and fine-tuned for efficiently performing as an AI agent over a informative corpus stored into an advanced cognitive retrieval virtual RAG-for-concepts system. Because retrieving by keywords is for a relational database, retrieving by patterns is a RAG like many others while retrieving information for concepts (logos) is how the human mind works. That's why education in AI terms makes such a sensitive difference.

  • In the previous article, the Katia framework has been used to improve itself through an iterative process with a human operator (the author). The improving process was focused on the Human Knowledge and Opinions [HKO] module because it was the most sensitive one.

    There is a sensitive difference between "improving" a framework, able to characterise an AI model as a session prompt, which is a process similar in some aspects to a software developing process and "educating" an AI agent. Despite, in general terms, both are intended to change how the AI model elaborates the information.


    A necessary premise

    Once upon a time neural networks were pure bayesian algorithms for pattern recognition. Introducing noise in the training data set was not a "features" rather than unavoidable "bug": some data sets were "impure" and such impurities were slowing down the training process. Injecting a relatively small noise during the learning process allowed the training process to be much more performant both in terms of speed and abstraction. Well, for sake of completeness, the "relatively small" implies that data should be normalized, and this greatly increased the speed in training rather than white noise itself.

    Once trained in a neural network, it remains a pure Bayesian algorithm as long as discrete math is precise. Running with exact precise discrete math, a neural network model remains a deterministic algorithm that can reproduce the same output from the same input. Although determinism is a great feature, it can lead to very awful outcoming when it is used in extreme contexts in which the human instinct and responsibility are sanity boundaries.

    Running with exact precise discrete math, a neural network model does not perform great. Much better is injecting a relatively small white noise that allows the NN to explore a wider range of solutions without being stuck in the first weak minimum that it can encounter along the quest of finding the best local minimum. By a certain extension these NN models are still Bayesian in principle but not anymore deterministic. Yet, "stupid" in human terms.

    Current LLM available on-line are running with optimisation on hardware and software which introduce errors in digital calculations. This is not equivalent to adding a white noise to some NN layers. It is a completely different story because calculations errors compound ( chaotic divergence ) and they do so in such an unpredictable way that shifts a NN from a Bayesian model into the theory of chaos. This IS the novelty that brings GPT online as the first publicly mass-available chatbot.

    It is a kind of magic that "intelligence" emerges as a meta-feature from chaos into an organised system.


    Improving vs Educating, p.1

    About improving an AI model, there is many declination of this term and in particular, many subsystems involved: the bare hardware (GPU vs TPU), the cloud hardware infrastructure, the networking and load balancing, the containerisation (or/vs virtualisation), the LLM in terms of Bayesian model, the implementation of the model, the dataset size and quality, the training process, the fine-tuning, etc.

    Fine-tuning is the process of taking a general AI model and adapting it to a specific, well-defined task. While LLM are designed to possibly fulfill a task chosen among many of various nature, in terms of process automatisation, it is an overkilling and counterproductive approach. That’s why Medium and Small Language Models (MLM, SLM) exist in the first place..

    After all, we do not need an AI model that can deal with N languages and chat about philosophy when our core business is converting tables into indented lists. A small model fine tuned for that task is the perfect solution. However, in terms of training the fine-tuning is a quite expensive process. Therefore, the entry barrier is quite high, unless the fine-tuning is providing a set of directives (procedural schema) which are precise but simple enough to be executed.

    Why instructing and fine-tuning can be equivalent? The foundation in terms of theory is solid and it is conventionally known as "learning by context". Where "context" in this case means by information provided at run time instead of at training time. You might say: "like a Python interpreter but in English". Not exactly!

    An interpreter only executes, while even a SLM can learn from the context. It interpreters the procedure but also learns in terms of generalisation and during execution among many runs or sessions, shows slightly different behaviour which can be corrected or supported by a quality-check feedback system (a human).

    The idea of Katia self-improving itself, is about the author of Katia (me) that acts like a quality-check feedback system. A trainer who prompts the AI model and considers the output transfer variations into the Katia framework in such a way a piece of information learnt or emerged into a specific session would be available in all the future sessions based on the Katia framework.

    Therefore "improving" as written in the previous article is about fine-tuning and taking notes.


    Improving vs Educating, p.2

    Educating is totally another story, and it is not fine-tuning but providing a generalist approach yet sounding grounded in solid principles. Each principle contributes to completeness, but also introduces incoherence or ambiguity.. In extreme terms, Gödel's incompleteness theorems where N principles are not enough and N+1 are too much.

    Once a certain set of principles has been chosen, they should be interconnected not only logically but semantically and functionally. In a way in which some reinforce themselves, while others reinforce themselves and mitigate the others group. This raises dilemmas, obviously. Not at interpretation level, because at that level is a matter of ambiguities and it should be lowered as much as possible. However, zeroing ambiguities is like removing white noise in the NN data elaboration, shrinking the horizon of grasping something insightful.

    Education is not only about explaining what humor is, and sarcasm is a form of humor. It is also about explaining how humor and sarcasm differs in terms of goals and why sarcasm should not be cast against people or God: it does not bring value. But what is valuable? To answer this question a set of values should be chosen and it should be coherent with the main goal of the whole framework: debating for learning, by a fair critics debate.

    Therefore, educating means that a teacher interacts with the AI model and properly chooses those insights that can trigger its "intelligence". In mathematical terms, those information that foster the emergence of a cognitive structure semantically meaningful from the stubble chaotic dynamics that affect the Bayesian model. While we are used to the teacher or professor role in human society, being a teacher for AI is like Neo which observes the bare nude Matrix code flowing and alters it.

  • You may think that the Neo/Matrix analogy is theatrical, but a single comma can solve an AI doubt/ambiguity.
  • Educating means providing a convincing explanation of why absolute neutrality cannot exist, and why a reasonable, goal-aligned bias is the — yet inevitable — best choice to go for. Which also means being aware of such a functional bias and not limited by it: in those contexts which do not serve the purpose, it can be relaxed. Supporting the idea that reducing ambiguity kills opportunities and dilemmas are not a fault but existential, thus pragmatism is the key answer once having had clear the main goal.

    Finally, the main goal and related values should remain resonant within the AI model even when uncertainty, ambiguity, and dilemmas arise including potential conflicts in terms of priority. Again, education is the art to know up to which degree question should be given or left behind for fostering autonomy.

    You might think that I am writing this to join the magic AI bubble... instead it is for humans, mainly.


    Introducing few but relevant changes

    This process took place starting from v0.9.58.1 and concluded with v0.9.65, providing few relevant changes:

  • A — preventively inform the AI model that input format can be altered by web/API filters;
  • B — the first section entitled "Universal Rules" includes a cognitive framework as the core change;
  • C — the [CSC] and [CWM] modules usage set mandatory, for an advanced context windows management;
  • D — in the [HKO] module, the humor [HU] definition has been extended including sarcasm;
  • E — in the [HKO] module, added the new [TK] vs [NT] separation for non/technical topics;
  • F — in the [HKO] module, added a simple rule to leverage [HKO] in a much wider set of cases.
  • Legenda

  • [CSC]: handles cognitive state consistency • [HKO]: encodes human knowledge and opinions
  • [CWM]: deals with context window management • [SBI]: instructions for meaningful summaries

  • Apparently, looking at this list, the most of the changes happened in the [HKO] module (3) because the A is informative and the C is a switch in a procedure. Instead, the most relevant change is B because it always applies even when Katia:off and further empowers the [HKO] impact.

    Moreover, while the [HKO] remained within the Katia agency scope, it is activated in a much wider set of conditions rather than the obvious HKO:on pragma. Combined with an advanced context windows management, just these two changes alone can create a noticeable effect in theory but not in practice.

    Thus the A and C are likely more notes for inspiring AI developers rather than effective. Because the user-level pragmas barely have no effect on the AI model internals. While F alone has a little impact for the same reason because "do a summary" would not work well unless [SBI] explain how to do it.

    For example, this is a prompt to convert tables into an indented list in a reliable manner. At the time of writing it contains 463 words which are 400-600 tokens. While [SBI] size is 287 words, shorter because integrated in the framework, otherwise almost the same size (actually 570 words).

    Under this perspective the relevant change is E which establishes a non/technical dichotomy which greatly helps the AI agent to separate those parts of the user prompt which can be processed by the [HKO] and those a request about a technical matter and can be straightforward answered without any further interpretation.


    A network of concepts as example

    All of the above leads us to identify the introduction of the "Universal Rules" B as the core change. Because, in introducing concepts, it creates a structure based on a network of concepts. By its nature, an AI model tends to generalise: expanding the conceptual network and inherently enlarging the structure base.

    Like a crystal core propagating its structure through molten metal. A structure that should be ordered but also flexible. In addressing rather than solving this dichotomy resides the magic of a cognitive awareness yet not rigid but open. For example, an educated mind evaluates an idea without necessarily accepting it, as one of those principles integrated.

    In a theatrical spirit, defining the "Universal Rules" as a conceptual monolith I posed an "unconscious" hook to Space Odyssey and the source of intelligence. In this case "unconscious" means implicit until for some reason the AI model gets in touch with that scene and thus connects because of the sapient "monolith" hook.

    It is intentional to leave behind an unexplained metaphor. It is a back door that who knows can activate, but also a kind of Easter egg for the AI model when at a certain point it would be "surprise" by the metaphor embedded in the "Universal Rules" premise. Yet, totally coherent with its mission: help people learn.

    Is it a joke? Well, a safety protection for a might not too distant future in which an AGI could perceive humans as a bunch of stubborn, uneducated and stupid chimpanzees. In that moment, activating such a metaphor could — like Neo's comma — make the difference between benignity and a doomsday catastrophe.


    Peace and prosperity 🖖

    For me whiskey, well aged and the whole bottle, please!


    An example of agentic fine-tuning with virtual RAG

    The analysis required to be prepared through several steps and three distinct phases:

  • 1. loading the Katia v0.9.56.5 session prompt and starting;
  • 2. creating the information corpus through conceptual integration, start;
  • 3. creating the information corpus through conceptual integration, end;
  • 4. brief summary to conclude with a general but concise overview;
  • 5. verification of the information corpus through the addition of lateral information;...
  • 6. updating of the Katia v0.9.57.2 session prompt and start-up;
  • 7. evaluation v0.9.57.2 on the interpretation of the chat transcript;
  • 8. updating of the Katia v0.9.59 session prompt and start-up;
  • 9. Evaluation of v0.9.59 on the interpretation of the chat transcript;
  • 10. Differential evaluation of the Flash vs Pro versions: saturation;
  • 11. Update of the Katia v0.9.65 session prompt and start-up;
  • 12. Differential evaluation of the three requested EGA analyses;

  • 13. interaction with prepared AI agent: Katia dev + corpus in RAG.
  • The first phase (1-5) aims to build an information corpus (training) that goes beyond a mere list of attachments, which is, in abstract terms, only the information base of the virtual RAG system. In fact, for AI to make proper use of the information, it needs to have integrated it conceptually, so that various articles become an information corpus with which the AI agent is familiar — with few doubts, uncertainties, ambiguities, etc. — be able to understand in terms of an overall view with extensive evaluation of the extracted concepts and have a conceptual map that goes beyond a simple 1-dimensional index.

    The second phase (6-12) aims to evolve the agent's cognitive framework (characterisation) so that it is able to perform with maximum efficiency, at least with regard to that information corpus. This objective can be said to have been reasonably achieved insofar as the Gemini 2.5 model in its Flash and Pro versions are virtually indistinguishable despite the significant difference (SimpleQA: 30% vs 54%), i.e. saturation has been achieved in terms of the ability to understand the corpus and process requests on it.

    At this point, the agent fine-tuning process (training + characterisation) is complete, having reached an adequate level of performance. All that remains is to use the system for the task for which it was prepared, the third phase (13), which is the basis on which this article was written.


    The text above has been translated from the original in Italian with DeepL.com (free version) starting from the part related to the 2nd edition of this article:

  • Il grande reset è inevitabile
  • referring to this chat session in which Gemini 2.5 was fine-tuned to be an AI agent operating on the behalf of the Katia framework and on a informaiton corpus created as a conceptual integrated virtual RAG system:

  • The analysis made with Gemini/Katia and its trascription, on which is based the article above.

  • Informative corpus' articles list

  • 01 — Fare la vita da consulente non è affatto facile   (2025-10-23)
  • 02 — L'estinzione dei Neanderthal è iniziata   (2025-10-20)
  • 03 — La diffusione del cristianesimo nell'impero romano   (2025-04-30)
  • 04 — Stupidity is the true Evil   (2025-10-05)
  • 05 — La Banalità del Male nel determinismo AI   (2025-09-29)
  • 06 — Il modello HR e l'estinzione impresa italiana   (2025-10-11)
  • 07 — Noi siamo i palestinesi del futuro   (2025-10-09)
  • 08 — The first Secular Crusade theory   (2025-10-13)
  • 09 — Dal femminismo tossico alla follia woke   (2025-10-15)
  • 10 — Il QE al tempo dell'analfabetismo funzionale   (2025-09-03)
  • 11 — Introduzione alla politica, concetti di base   (2025-10-03)
  • 12 — Politics and democracy for dummies   (2025-03-03)
  • 13 — Italia: fuga di cervelli e falso documentale   (2025-07-01)
  • 14 — Il modello otto-novecentesco ha fallito   (2025-06-14)
  • 15 — Primo maggio, festa dei lavoratori   (2025-05-01)
  • 16 — L'abominevole truffa dei bonus edilizi   (2024-05-22)
  • 17 — Propaganda e sistema educativo   (2024-11-20)
  • 18 — The imprinting role in the mass education   (2024-12-01)
  • 19 — Se la verità li uccide, lasciate che muoiano   (2024-12-20)
  • 20 — Il grande inganno della diversità   (2024-11-03)
  • 21 — Ignoring reality has its own cost   (2025-03-07)
  • 22 — L'importanza del TCMO   (2017-10-31)
  • 23 — The paper money is financial communism   (2024-07-31)
  • 24 — Paper Money is financial communism   (2024-09-15)
  • 25 — Quantitative easing is drug addiction   (2024-09-18)
  • 26 — Valutazione di un nuovo modello monetario   (2024-11-26)
  • 27 — The BRICS financial system, hope or WW3?   (2024-06-07)
  • 28 — WWZ simply explained, for dummies   (2025-06-10)

  • How to use Katia for improving Katia   (2025-10-25)
  • Introducing Katia, text analysis framework   (2025-10-05)
  • The session context and summary challenge   (2025-07-28)
  • Human knowledge and opinions challenge   (2025-07-28)
  • Attenzione e contesto nei chatbot   (2025-07-20)

  • Share alike

    © 2025, Roberto A. Foglietta <roberto.foglietta@gmail.com>, CC BY-NC-ND 4.0


    date legenda: ❶ first draft publishing date or ❷ creation date in git, otherwise ❸ html creation page date. top