[AI] The fun side for me

Daestrum

Expert
Licensed User
Longtime User
Spent the last week writing a complete tool system for AI (OpenAI format tool calls). All tools are hot-swappable while model is running.
As the AI decides when to use a tool, having a selection to choose from is important.
Although tools don't take long to write (maybe 5 minutes) what I think it needs and what it thinks it needs differs a lot.
Currently, my local model has tools that allow reading the web, running Code Bundle on a B4X project, checking if I have any windows updates pending - things like that. Its free to choose the tools and swap as needed.
Now I gave it the ability to create new tools itself (subject to safety limits) this was where the fun started, it sees a lack and fills it. Takes maybe 5 mins to design a new tool and impliment it.
Far more fun than just using the AI.

(Its banned form making any tool called SkyNet)
 

Daestrum

Expert
Licensed User
Longtime User
Did find a quirk (depends on model you use locally) tools need a description - so model can decide what to use. I re-wrote all mine in Mandarin, the amount of context it saves is unreal, I save at least 50% on each tool. Most Mandarin has 1:1 token so reasoning is faster too.
 

Daestrum

Expert
Licensed User
Longtime User
As a result of a fun side thought, I am now adding experts to the LLM (it can use them tools).
It creates a new expert - trains it - uses it.
The experts don't even understand English or grammar, they are 100% trained on a domain (B4J, C#, SQL) - no cross thinking (adding functions from one language to another) they simply do not know any other domain.

Should be fun (if it works) the true meaning MoE (mixture of Experts) or VMoe (Variable Mixture of Experts) that can be individually trained.
 

William Lancee

Well-Known Member
Licensed User
Longtime User
I hope you will continue this thread - describing your experiences with this approach.
We like to have fun too. Perhaps you can show us how do this magic (it doesn't have to be all B4X).

Personally, I have taking a Machine Learning course, so I am familiar with the constructs.
But my Mandarin is not up to 鼻烟, and there are many choices to make about models and steps.
 

Daestrum

Expert
Licensed User
Longtime User
I have a (really messy) repo that contains the tools side. ( ChattyNet repo) Haven't put the experts up there yet - spent all day fighting forward propagation and reshaping arrays. Been training the first one - a massive 500k weights - it munched through 5k of source code in 13 seconds.
 

William Lancee

Well-Known Member
Licensed User
Longtime User
Ok. I asked AI. It answered:

When a developer says they have "tools" in a "ChattyNet" repository, they are referring to a set of pre-written C# utilities designed for AI tool-calling and AI hot-swapping. [1, 2]

The developer means the following:
  • AI Function Calling: They built or gathered specific functions that allow an AI model to take action, such as executing commands or retrieving information, rather than just generating text. [1, 2]
  • Code Location: These utility files and scripts are stored and managed in a shared online code workspace (a repository) named ChattyNet, typically hosted on platforms like GitHub. [1, 2]
  • Reusability: Instead of building AI commands from scratch every time, the developer can reuse, update, or "hot-swap" these tools to give their AI projects new capabilities on the fly.

    It gave me this link: https://github.com/topics/tool-calling?l=c#&o=desc&s=updated
    @Daestrum 's work is about a page down - fascinating stuff.
 

Daestrum

Expert
Licensed User
Longtime User
The AI experts will just slot in like tools - so the AI choses the best fit for purpose.
The tool side is working fine (Nemotron can make its own tools - write C# - compile and hot load them)
 
Top